]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Alpha OSF/1 fix
authorGuido van Rossum <guido@python.org>
Mon, 9 Jan 1995 17:50:47 +0000 (17:50 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 9 Jan 1995 17:50:47 +0000 (17:50 +0000)
Python/thread_pthread.h

index 94b918245bcf3eee370c962c292e7ca2b923f412..a4222cf1e068d1ece3073b84f815482bb911b37d 100644 (file)
@@ -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)