Loading...
Searching...
No Matches
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
9#pragma once
10
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
28struct __pthread_tls_key;
29
34struct __pthread_tls_datum;
35
39typedef struct __pthread_tls_key *pthread_key_t;
40
47
54int pthread_setspecific(pthread_key_t key, const void *value);
55
62int pthread_key_create(pthread_key_t *key, void (*destructor)(void *));
63
71
77void __pthread_keys_exit(int self_id);
78
83struct __pthread_tls_datum **__pthread_get_tls_head(int self_id) PURE;
84
85#ifdef __cplusplus
86}
87#endif
88
#define PURE
The function has no effects except the return value and its return value depends only on the paramete...
void __pthread_keys_exit(int self_id)
Destroys all thread-specific keys for pthread self_id.
int pthread_setspecific(pthread_key_t key, const void *value)
Set and binds a specific tls to a key.
struct __pthread_tls_key * pthread_key_t
A thread-specific key.
Definition pthread_tls.h:39
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.
void * pthread_getspecific(pthread_key_t key)
Returns the requested tls.
int pthread_key_delete(pthread_key_t key)
Deletes a pthread_key_t that was previously created with 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.