20 #include <sys/cdefs.h>
24 #include <sys/queue.h>
125 int kthread_tls_init();
126 void kthread_tls_shutdown();
struct kthread_tls_kv kthread_tls_kv_t
Thread-local storage key-value pair.
int kthread_key_create(kthread_key_t *key, void(*destructor)(void *))
Create a new thread-local storage key.
LIST_ENTRY(kthread_tls_kv) kv_list
List handle – NOT a function.
int kthread_key_delete(kthread_key_t key)
Delete a TLS key.
typedef LIST_HEAD(nmmgr_list, nmmgr_handler) nmmgr_list_t
Name handler list type.
Thread-local storage key-value pair.
Definition: tls.h:37
kthread_key_t key
The key associated with this data.
Definition: tls.h:42
void * kthread_getspecific(kthread_key_t key)
Retrieve a value associated with a TLS key.
int kthread_setspecific(kthread_key_t key, const void *value)
Set thread specific data for a key.
void * data
The value of the data.
Definition: tls.h:45
void(* destructor)(void *)
Optional destructor for the value (set per key).
Definition: tls.h:48
int kthread_key_t
Thread-local storage key type.
Definition: tls.h:27