Subj : Re: pthread_getspecific or __thread for signal handler? To : comp.programming.threads From : Alexander Terekhov Date : Tue Feb 01 2005 09:11 am Loic Domaigne wrote: [...] > I would go for __thread. > > Because on platform where it is not supported, you won't be able to > compile the program. And on platform where it is supported, it should > work too. Should work? Not if allocation of __thread storage is done lazy and in async-signal-UNsafe manner. Next comes "violation" of C/POSIX restriction imposed on accesses within async-signal handlers (only assignments to static volatile sig_atomic_t are allowed). regards, alexander. .