tss_create, tss_delete, tss_set, tss_get - C11 thread-specific storage functions
int tss_create(tss_t *key, tss_dtor_t dtor);
void tss_delete(tss_t key);
int tss_set(tss_t key, void *val);
void *tss_get(tss_t key);
The tss_create(), tss_delete(), tss_set(), and tss_get() functions are part of the threads interfaces as specified in the C11 standard. They are simple wrappers over the more general pthreads functions. See INCITS/ISO/IEC 9899:2011.
Upon successful completion, the tss_create() and tss_set() functions return 0, otherwise thrd_error is returned.
Upon successful completion, the tss_get() function returns the value for the current thread, otherwise, it returns NULL.
No value is returned by the tss_delete() function.
See attributes(7) for descriptions of the following attributes: