I\'ve read Kerrisk\'s The Linux Programming Interface: A Linux and UNIX System Programming Handbook, Chapter 31 on Threads. The chapter include Thread Specific Data (Section
The pthread interfaces are POSIX standard, so they are more portable. Use them if you intend to use the code on something besides a linux system. On the other hand, if you are strictly on gcc/linux, then the __thread mechanism is certainly easier to use. Just be aware that it is a gcc specific extension, and not supported on all platforms.