Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
3.0.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
pthread_key.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 Intel Corporation
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_POSIX_PTHREAD_KEY_H_
8
#define ZEPHYR_INCLUDE_POSIX_PTHREAD_KEY_H_
9
10
#ifdef CONFIG_PTHREAD_IPC
11
#include <
sys/slist.h
>
12
#include <
zephyr/types.h
>
13
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
17
18
typedef
uint32_t
pthread_once_t;
19
20
/* pthread_key */
21
typedef
void
*pthread_key_t;
22
23
typedef
struct
pthread_key_obj {
24
/* List of pthread_key_data objects that contain thread
25
* specific data for the key
26
*/
27
sys_slist_t
key_data_l;
28
29
/* Optional destructor that is passed to pthread_key_create() */
30
void (*destructor)(
void
*);
31
} pthread_key_obj;
32
33
typedef
struct
pthread_thread_data {
34
sys_snode_t
node;
35
36
/* Key and thread specific data passed to pthread_setspecific() */
37
pthread_key_obj *
key
;
38
void
*spec_data;
39
} pthread_thread_data;
40
41
typedef
struct
pthread_key_data {
42
sys_snode_t
node;
43
pthread_thread_data
thread_data
;
44
} pthread_key_data;
45
46
#ifdef __cplusplus
47
}
48
#endif
49
50
#endif
/* CONFIG_PTHREAD_IPC */
51
52
#endif
/* ZEPHYR_INCLUDE_POSIX_PTHREAD_KEY_H_*/
types.h
slist.h
Single-linked list implementation.
sys_slist_t
struct _slist sys_slist_t
Definition:
slist.h:40
sys_snode_t
struct _snode sys_snode_t
Definition:
slist.h:33
key
static k_spinlock_key_t key
Definition:
spinlock_error_case.c:14
thread_data
struct k_thread thread_data
Definition:
main.c:56
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:60
include
posix
pthread_key.h
Generated on Mon Feb 21 2022 22:43:02 for Zephyr API Documentation by
1.9.2