diff mbox

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

Message ID 6B86B7F2A4026246AA81BA1ABF9756905C50D864@fmsmsx107.amr.corp.intel.com
State New
Headers show

Commit Message

Tannenbaum, Barry M Sept. 29, 2014, 6:26 p.m. UTC
It's a remnant from something we were attempting to support (and abandoned) 4 years ago. I'm fine with removing it from the runtime.

Igor, I'll make the change and send you a new copy.

   - Barry

-----Original Message-----
From: Thomas Schwinge [mailto:thomas@codesourcery.com] 

Sent: Monday, September 29, 2014 2:13 PM
To: Iyer, Balaji V; Tannenbaum, Barry M; Zamyatin, Igor
Cc: gcc-patches@gcc.gnu.org
Subject: libcilkrts: Remove unused function __cilkrts_sysdep_is_worker_thread_id (was: Cilk Library)

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