Thread-specific data

While all threads can access the same memory, it is sometimes desirable to have data that is (logically) local to a specific thread. The key/value mechanism provides for global (process-wide) keys with value bindings that are unique to a thread.

You can also use the pthread_tag_np() function to set and query 65 bytes of thread tag data associated with the caller's thread.