pthread_tls.h¶
RIOT POSIX thread local storage.
-
struct __pthread_tls_key *
pthread_key_t
¶ A thread-specific key.
-
void *
pthread_getspecific
(pthread_tls.h::pthread_key_t
key)¶ Returns the requested tls.
Parameters
key: the identifier for the requested tls Return values
- returns pointer to the storage on success, a 0 value otherwise
-
int
pthread_setspecific
(pthread_tls.h::pthread_key_t
key, const void * value)¶ Set and binds a specific tls to a key.
Parameters
key: the identifier for the tls value: pointer to the location of the tls Return values
- returns 0 on success, an errorcode otherwise
-
int
pthread_key_create
(pthread_tls.h::pthread_key_t
* key, void(*)(void *) destructor)¶ Creates a new key to be used to identify a specific tls.
Parameters
key: the created key is scribed to the given pointer destructor: function pointer called when non NULL just befor the pthread exits Return values
- returns 0 on success, an errorcode otherwise
-
int
pthread_key_delete
(pthread_tls.h::pthread_key_t
key)¶ Deletes a pthread_key_t that was previously created with pthread_key_create.
does not call the destructor of the key
Parameters
key: the identifier of the key to be deleted Return values
- returns 0 on success, an errorcode otherwise
-
void
__pthread_keys_exit
(int self_id)¶ Destroys all thread-specific keys for pthread
self_id
.Parameters
self_id: the result of pthread_threading.h::pthread_self()
.
-
struct __pthread_tls_datum **
__pthread_get_tls_head
(int self_id)¶ Returns the pointer to the head of the list of thread-specific data.