summaryrefslogtreecommitdiff
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 1d539eea63..c5d7be4d88 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -83,9 +83,7 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
static int local_initialized = 0;
#endif /* SGI_THREADS and USE_DL */
pthread_t th;
- int success = 0; /* init not needed when SOLARIS_THREADS and */
- /* C_THREADS implemented properly */
-
+ int success;
dprintf(("start_new_thread called\n"));
if (!initialized)
init_thread();
@@ -93,6 +91,13 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ if (!initialized)
+ init_thread();
+ return (long) pthread_self();
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));