Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

Enhanced Threading Library > tss_set (3)
HTML TXT PDF PS
tss_set(3) Library Functions Manual tss_set(3)

tss_setset thread specific data

library “threads”
#include <threads.h>

int
tss_set(tss_t *key, void *value);

The function () will associate the data given by value to the current thread instance of the data key. In order to remove the data association a NULL can be passed to the value argument.

Calling () will not execute the data destructor that might have been supplied to tss_create(3), as such it may be called from the aforementioned destructor.

On success tss_set() will return thrd_success or thrd_error otherwise.

tss_create(3) tss_get(3) tss_delete(3)

The tss_set() function first appeared in the C11 standard ISO/IEC 9899:2011.

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian