From: Guido van Rossum Date: Thu, 27 Aug 1998 19:21:53 +0000 (+0000) Subject: Add a 'volatile' to the declaration of threadid in get_thread_ident(). X-Git-Tag: v1.5.2a2~338 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44ee479427dd895efcbef2ab263da901836966a4;p=python Add a 'volatile' to the declaration of threadid in get_thread_ident(). According to Vladimir Marangozov, this is necessary for AIX, where high optimization levels inline this function and then get it wrong :-( --- diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 8758430103..64100f4f4f 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -167,7 +167,7 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) long get_thread_ident _P0() { - pthread_t threadid; + volatile pthread_t threadid; if (!initialized) init_thread(); /* Jump through some hoops for Alpha OSF/1 */