# Thread-Specific Data

- ## Global data item - each thread has a different value.

- ## Pthreads uses a Key/Value model.

- ## Cumbersome and expensive to access.

  - Use data structures rather than separate keys.

- ## One thread creates a key.

  - Can supply a destructor function.
  - Key must be in memory accessible to all threads.

- ## errno - is a special case.

From THREADTIME: by Norton/Dipasquale Prentice-Hall.

Previous slide | Next slide | Back to first slide | View graphic version