Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2565bff

Browse files
committed
Alpha OSF/1 fix
1 parent 37431fb commit 2565bff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Python/thread_pthread.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,12 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
9393

9494
long get_thread_ident _P0()
9595
{
96+
pthread_t threadid;
9697
if (!initialized)
9798
init_thread();
98-
return (long) pthread_self();
99+
/* Jump through some hoops for Alpha OSF/1 */
100+
threadid = pthread_self();
101+
return (long) *(long *) &threadid;
99102
}
100103

101104
static void do_exit_thread _P1(no_cleanup, int no_cleanup)

0 commit comments

Comments
 (0)