Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
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_*/
void
void
Definition:
eswifi_shell.c:15
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 Sun Oct 9 2022 09:21:57 for Zephyr API Documentation by
1.9.4