This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__thread or pthread_getspecific ?


Hello !

I need to use a thread local storage variable in a glibc/gcc linux application.

I wonder whether should I use glibc's pthread getspecific/setspecific routines
or just use gcc's __thread storage class keyword ?

Can you please tell me what are the pros and cons of either of these methods ?

Thank you in advance,
Sabhe


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]