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

Skip to content

Commit 44ee479

Browse files
committed
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 :-(
1 parent 53195c1 commit 44ee479

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/thread_pthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
167167

168168
long get_thread_ident _P0()
169169
{
170-
pthread_t threadid;
170+
volatile pthread_t threadid;
171171
if (!initialized)
172172
init_thread();
173173
/* Jump through some hoops for Alpha OSF/1 */

0 commit comments

Comments
 (0)