tss_create Subroutine
Purpose
This subroutine creates a thread-specific storage pointer.
Library
Standard C Library (libc.a)
Syntax
#include <threads.h>
int tss_create(tss_t *key, tss_dtor_t dtor);
Description
The tss_create subroutine creates a thread-specific storage pointer with the dtor destructor, which is potentially null.
Parameters
Item | Description |
---|---|
key | A thread-specific storage pointer that is created. |
dtor | A pointer for a destructor and it is potentially null. |
Return Values
If the tss_create subroutine is successful, it sets the value of the key thread-specific storage pointer that uniquely identifies the newly created pointer and returns thrd_success. If the tss_create subroutine fails the thrd_error is returned and the value of the key thread-specific storage pointer is set to an undefined value.
Files
Item | Description |
---|---|
threads.h | Standard macros, data types, and subroutines are defined by the threads.h file. |