diff mbox

libcilkrts: Remove unused function __cilkrts_sysdep_is_worker_thread_id (was: Cilk Library)

Message ID 8738bae1mp.fsf@kepler.schwinge.homeip.net
State New
Headers show

Commit Message

Thomas Schwinge Sept. 29, 2014, 6:13 p.m. UTC
Hi!

On Wed, 9 Oct 2013 18:32:11 +0000, "Iyer, Balaji V" <balaji.v.iyer@intel.com> wrote:
> [libcilkrts]

I have found a function that is -- as far as I can tell -- unused, and
I'm thus proposing to remove it.  This increases portability, as this
code has dependencies on the operating system.  Tested on x86 GNU/Hurd,
and x86_64 GNU/Linux is in progress.  OK for trunk once testing
completed?

commit 4f32339be3c95330b7fcd3bc6bb520a7401aa510
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Sat Sep 20 19:53:56 2014 +0200

    libcilkrts: Remove unused function __cilkrts_sysdep_is_worker_thread_id.
    
    	libcilkrts/
    	* runtime/sysdep-unix.c (__cilkrts_sysdep_is_worker_thread_id):
    	Remove function.
---
 libcilkrts/runtime/sysdep-unix.c | 22 ----------------------
 1 file changed, 22 deletions(-)



Grüße,
 Thomas

Comments

Jeff Law Sept. 29, 2014, 9 p.m. UTC | #1
On 09/29/14 12:13, Thomas Schwinge wrote:
> Hi!
>
> On Wed, 9 Oct 2013 18:32:11 +0000, "Iyer, Balaji V" <balaji.v.iyer@intel.com> wrote:
>> [libcilkrts]
>
> I have found a function that is -- as far as I can tell -- unused, and
> I'm thus proposing to remove it.  This increases portability, as this
> code has dependencies on the operating system.  Tested on x86 GNU/Hurd,
> and x86_64 GNU/Linux is in progress.  OK for trunk once testing
> completed?
>
> commit 4f32339be3c95330b7fcd3bc6bb520a7401aa510
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date:   Sat Sep 20 19:53:56 2014 +0200
>
>      libcilkrts: Remove unused function __cilkrts_sysdep_is_worker_thread_id.
>
>      	libcilkrts/
>      	* runtime/sysdep-unix.c (__cilkrts_sysdep_is_worker_thread_id):
>      	Remove function.
The Cilk+ runtime is shared with ICC and they'll need to pull in this 
code first.  We can then pick it up via merges.

jeff
Thomas Schwinge Sept. 29, 2014, 9:06 p.m. UTC | #2
Hi!

On Mon, 29 Sep 2014 15:00:03 -0600, Jeff Law <law@redhat.com> wrote:
> On 09/29/14 12:13, Thomas Schwinge wrote:
> >      	libcilkrts/
> >      	* [...]

> The Cilk+ runtime is shared with ICC and they'll need to pull in this 
> code first.  We can then pick it up via merges.

Yeah, Barry is already guiding me through this process.


Grüße,
 Thomas
diff mbox

Patch

diff --git libcilkrts/runtime/sysdep-unix.c libcilkrts/runtime/sysdep-unix.c
index 1f82b62..b9f1ad0 100644
--- libcilkrts/runtime/sysdep-unix.c
+++ libcilkrts/runtime/sysdep-unix.c
@@ -571,28 +571,6 @@  void __cilkrts_make_unrunnable_sysdep(__cilkrts_worker *w,
     }
 }
 
-/*
- * __cilkrts_sysdep_is_worker_thread_id
- *
- * Returns true if the thread ID specified matches the thread ID we saved
- * for a worker.
- */
-
-int __cilkrts_sysdep_is_worker_thread_id(global_state_t *g,
-                                         int i,
-                                         void *thread_id)
-{
-#if defined( __linux__) || defined(__VXWORKS__)
-    pthread_t tid = *(pthread_t *)thread_id;
-    if (i < 0 || i > g->total_workers)
-        return 0;
-    return g->sysdep->threads[i] == tid;
-#else
-    // Needs to be implemented
-    return 0;
-#endif
-}
-