From 2565bff40a6d7d06c29b7d7a7a580f78b1d4f169 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 9 Jan 1995 17:50:47 +0000 Subject: Alpha OSF/1 fix --- Python/thread_pthread.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 94b9182..a4222cf 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -93,9 +93,12 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) long get_thread_ident _P0() { + pthread_t threadid; if (!initialized) init_thread(); - return (long) pthread_self(); + /* Jump through some hoops for Alpha OSF/1 */ + threadid = pthread_self(); + return (long) *(long *) &threadid; } static void do_exit_thread _P1(no_cleanup, int no_cleanup) -- cgit v0.12