RIOT POSIX thread local storage.
More...
Go to the source code of this file.
◆ __pthread_keys_exit()
void __pthread_keys_exit |
( |
int |
self_id | ) |
|
Destroys all thread-specific keys for pthread self_id
.
- Parameters
-
◆ pthread_getspecific()
Returns the requested tls.
- Parameters
-
[in] | key | the identifier for the requested tls |
- Returns
- returns pointer to the storage on success, a 0 value otherwise
◆ pthread_key_create()
int pthread_key_create |
( |
pthread_key_t * |
key, |
|
|
void(*)(void *) |
destructor |
|
) |
| |
Creates a new key to be used to identify a specific tls.
- Parameters
-
[out] | key | the created key is scribed to the given pointer |
[in] | destructor | function pointer called when non NULL just before the pthread exits |
- Returns
- returns 0 on success, an errorcode otherwise
◆ pthread_key_delete()
Deletes a pthread_key_t that was previously created with pthread_key_create.
does not call the destructor of the key
- Parameters
-
[in] | key | the identifier of the key to be deleted |
- Returns
- returns 0 on success, an errorcode otherwise
◆ pthread_setspecific()
int pthread_setspecific |
( |
pthread_key_t |
key, |
|
|
const void * |
value |
|
) |
| |
Set and binds a specific tls to a key.
- Parameters
-
[in] | key | the identifier for the tls |
[in] | value | pointer to the location of the tls |
- Returns
- returns 0 on success, an errorcode otherwise