Loading...
Searching...
No Matches
pthread_tls.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
25struct __pthread_tls_key;
26
31struct __pthread_tls_datum;
32
36typedef struct __pthread_tls_key *pthread_key_t;
37
44
51int pthread_setspecific(pthread_key_t key, const void *value);
52
59int pthread_key_create(pthread_key_t *key, void (*destructor)(void *));
60
68
74void __pthread_keys_exit(int self_id);
75
80struct __pthread_tls_datum **__pthread_get_tls_head(int self_id) PURE;
81
82#ifdef __cplusplus
83}
84#endif
85
#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:36
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.