pthread_tls.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Hamburg University of Applied Sciences (HAW)
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
18 #ifndef PTHREAD_TLS_H
19 #define PTHREAD_TLS_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
29 struct __pthread_tls_key;
30 
35 struct __pthread_tls_datum;
36 
40 typedef struct __pthread_tls_key *pthread_key_t;
41 
48 
55 int pthread_setspecific(pthread_key_t key, const void *value);
56 
63 int pthread_key_create(pthread_key_t *key, void (*destructor)(void *));
64 
72 
78 void __pthread_keys_exit(int self_id);
79 
84 struct __pthread_tls_datum **__pthread_get_tls_head(int self_id) PURE;
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* PTHREAD_TLS_H */
91 
pthread_getspecific
void * pthread_getspecific(pthread_key_t key)
Returns the requested tls.
pthread_setspecific
int pthread_setspecific(pthread_key_t key, const void *value)
Set and binds a specific tls to a key.
pthread_key_delete
int pthread_key_delete(pthread_key_t key)
Deletes a pthread_key_t that was previously created with pthread_key_create.
__pthread_get_tls_head
struct __pthread_tls_datum ** __pthread_get_tls_head(int self_id) PURE
Returns the pointer to the head of the list of thread-specific data.
__pthread_keys_exit
void __pthread_keys_exit(int self_id)
Destroys all thread-specific keys for pthread self_id.
pthread_key_t
struct __pthread_tls_key * pthread_key_t
A thread-specific key.
Definition: pthread_tls.h:40
pthread_key_create
int pthread_key_create(pthread_key_t *key, void(*destructor)(void *))
Creates a new key to be used to identify a specific tls.
PURE
#define PURE
The function has no effects except the return value and its return value depends only on the paramete...
Definition: kernel_defines.h:99