[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


2.5 Thread-Specific Data

Each thread has an area in which thread-specific data information is kept.

You can associate arbitrary data with a thread's context. You can think of this as the ability to add user-specified fields to the current thread's context or as global variables that have private values in each thread. A thread-specific data key is shared by all threads within the process-each thread has its own unique value for that shared key.

Use the following routines to create and access thread-specific data information: