#include <oskit/threads/pthread.h>int pthread_key_create(pthread_ket_t *key, void (*destructor)(void *));
Create a thread-specific key for use with pthread_setspecific. If specified, the destructor is called on any non-NULL key/value pair when a thread exits.
- key
- Address where the new key value should be stored.
- destructor
- Pointer to the destructor function, which may be NULL.
Returns zero on success, and stores the new key value at *key. Returns EAGAIN if the are no more keys available.
pthread_key_delete, pthread_setspecific, pthread_getspecific