Defined in header <threads.h> | ||
---|---|---|
void *tss_get( tss_t tss_key ); | (since C11) |
Returns the value held in thread-specific storage for the current thread identified by tss_key
. Different threads may get different values identified by the same key.
On thread startup (see thrd_create
), the values associated with all TSS keys are NULL. Different value may be placed in the thread-specific storage with tss_set
.
tss_key | - | thread-specific storage key, obtained from tss_create and not deleted by tss_delete |
The value on success, NULL
on failure.
The POSIX equivalent for this function is pthread_getspecific.
(C11) | write to thread-specific storage (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/c/thread/tss_get