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

Thomas Schwinge thomas@codesourcery.com
Mon Sep 29 18:13:00 GMT 2014


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(-)

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
-}
-
 
 
 


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140929/3e26fe7b/attachment.sig>


More information about the Gcc-patches mailing list