##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# tss_create

From cppreference.com
< c‎ | thread

Defined in header `<threads.h>` |  |
int tss_create( tss_t* tss_id, tss_dtor_t destructor ); |  | (since C11)

Creates new thread-specific storage and optionally stores destructor which is called when the storage is deleted. The object pointed to by `tss_id` is set to the identifier of the new thread-specific storage.

### [edit] Parameters

tss_id | - | pointer to memory location to store the identifier of the thread-specific storage
destructor | - | pointer to a function to call when the storage is deleted

### [edit] Return value

thrd_success if successful, thrd_error otherwise.

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/thread/tss_create&oldid=63562"