]> granicus.if.org Git - python/commitdiff
Add a 'volatile' to the declaration of threadid in get_thread_ident().
authorGuido van Rossum <guido@python.org>
Thu, 27 Aug 1998 19:21:53 +0000 (19:21 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 27 Aug 1998 19:21:53 +0000 (19:21 +0000)
According to Vladimir Marangozov, this is necessary for AIX, where
high optimization levels inline this function and then get it wrong :-(

Python/thread_pthread.h

index 875843010374f2b5c840980fe061039d3d219f82..64100f4f4fa76360b8ef9502404a49b8442f8dc0 100644 (file)
@@ -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 */