Subj : pthread_once() does not update __pthread_once_pad To : comp.programming.threads From : Scott Shinault Date : Sat Jan 29 2005 02:58 pm Having a problem where pthread_once() gets called, but does not update the __pthread_once_pad[3] to show that the init routine was called for the associated pthread_once_t var. The init routine gets called, and the resultant pthread_key_t variable can be used to call pthread_setspecific(), but a resultant pthread_getspecific() will fail. I can see in gdb that the __pthread_once_pad[3] value is unchanged. This is happening on SOlaris 9 SPARC with gcc 3.3.2, and on Solaris 8 x86. The code works on Linux with an older gcc and also on Solaris 8 SPARC with an older gcc. We can write our pthread_once() to increment the __pthread_once_pad[3] value and call the init function and it will work fine. Any clues? .