Mercurial > cpython-lru_cache-weakref
comparison Python/thread_pthread.h @ 2097:e4588404fdff legacy-trunk
Alpha OSF/1 fix
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 09 Jan 1995 17:50:47 +0000 |
| parents | d0d0a69b5ca3 |
| children | 07164d30429d |
comparison
equal
deleted
inserted
replaced
| 2096:d5c935b9a7b5 | 2097:e4588404fdff |
|---|---|
| 91 return success < 0 ? 0 : 1; | 91 return success < 0 ? 0 : 1; |
| 92 } | 92 } |
| 93 | 93 |
| 94 long get_thread_ident _P0() | 94 long get_thread_ident _P0() |
| 95 { | 95 { |
| 96 if (!initialized) | 96 pthread_t threadid; |
| 97 init_thread(); | 97 if (!initialized) |
| 98 return (long) pthread_self(); | 98 init_thread(); |
| 99 /* Jump through some hoops for Alpha OSF/1 */ | |
| 100 threadid = pthread_self(); | |
| 101 return (long) *(long *) &threadid; | |
| 99 } | 102 } |
| 100 | 103 |
| 101 static void do_exit_thread _P1(no_cleanup, int no_cleanup) | 104 static void do_exit_thread _P1(no_cleanup, int no_cleanup) |
| 102 { | 105 { |
| 103 dprintf(("exit_thread called\n")); | 106 dprintf(("exit_thread called\n")); |
