RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
posix
key.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
11
12
/*
13
* Copyright (c) 2012 Zhongwei Yao.
14
* COPYRIGHT (c) 1989-2011.
15
* On-Line Applications Research Corporation (OAR).
16
* Copyright (c) 2016 embedded brains GmbH & Co. KG
17
*
18
* Redistribution and use in source and binary forms, with or without
19
* modification, are permitted provided that the following conditions
20
* are met:
21
* 1. Redistributions of source code must retain the above copyright
22
* notice, this list of conditions and the following disclaimer.
23
* 2. Redistributions in binary form must reproduce the above copyright
24
* notice, this list of conditions and the following disclaimer in the
25
* documentation and/or other materials provided with the distribution.
26
*
27
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
* POSSIBILITY OF SUCH DAMAGE.
38
*/
39
40
#ifndef _RTEMS_POSIX_KEY_H
41
#define _RTEMS_POSIX_KEY_H
42
43
#include <
pthread.h
>
44
45
#include <
rtems/score/chain.h
>
46
#include <
rtems/score/object.h
>
47
#include <
rtems/score/rbtree.h
>
48
#include <
rtems/score/thread.h
>
49
50
#ifdef __cplusplus
51
extern
"C"
{
52
#endif
53
61
65
typedef
struct
{
69
Chain_Node
Key_node
;
70
74
RBTree_Node
Lookup_node
;
75
79
pthread_key_t
key
;
80
84
Thread_Control *
thread
;
85
89
void
*
value
;
90
}
POSIX_Keys_Key_value_pair
;
91
100
extern
POSIX_Keys_Key_value_pair
_POSIX_Keys_Key_value_pairs
[];
101
108
extern
const
uint32_t
_POSIX_Keys_Key_value_pair_maximum
;
109
113
typedef
struct
{
115
Objects_Control
Object
;
117
void (*
destructor
) (
void
*);
118
122
Chain_Control
Key_value_pairs
;
123
}
POSIX_Keys_Control
;
124
128
extern
Objects_Information
_POSIX_Keys_Information
;
129
138
#define POSIX_KEYS_INFORMATION_DEFINE( max ) \
139
OBJECTS_INFORMATION_DEFINE( \
140
_POSIX_Keys, \
141
OBJECTS_POSIX_API, \
142
OBJECTS_POSIX_KEYS, \
143
POSIX_Keys_Control, \
144
max, \
145
OBJECTS_NO_STRING_NAME, \
146
NULL \
147
)
148
150
151
#ifdef __cplusplus
152
}
153
#endif
154
155
#endif
156
/* end of include file */
_POSIX_Keys_Key_value_pairs
POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[]
The initial set of POSIX key and value pairs.
Definition
keyzerokvp.c:34
_POSIX_Keys_Key_value_pair_maximum
const uint32_t _POSIX_Keys_Key_value_pair_maximum
The POSIX key and value pairs maximum.
Definition
keyzerokvp.c:36
_POSIX_Keys_Information
Objects_Information _POSIX_Keys_Information
The POSIX Key objects information.
pthread.h
POSIX Threads Private Support.
rbtree.h
This header file provides interfaces of the Red-Black Tree Handler which are used by the implementati...
chain.h
This header file provides interfaces of the Chain Handler which are used by the implementation and th...
object.h
This header file provides interfaces of the Object Handler which are used by the implementation and t...
thread.h
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
Chain_Node
This structure represents a chain node.
Definition
chain.h:78
Objects_Control
Definition
objectdata.h:61
Objects_Information
The information structure used to manage each API class of objects.
Definition
objectdata.h:198
POSIX_Keys_Control
The data structure used to manage a POSIX key.
Definition
key.h:113
POSIX_Keys_Control::Key_value_pairs
Chain_Control Key_value_pairs
Key value pairs of this key.
Definition
key.h:122
POSIX_Keys_Control::Object
Objects_Control Object
Definition
key.h:115
POSIX_Keys_Control::destructor
void(*) destructor(void *)
Definition
key.h:117
POSIX_Keys_Key_value_pair
Represents POSIX key and value pair.
Definition
key.h:65
POSIX_Keys_Key_value_pair::key
pthread_key_t key
The POSIX key identifier used as the tree key.
Definition
key.h:79
POSIX_Keys_Key_value_pair::Key_node
Chain_Node Key_node
The chain node for the key value pairs chain in POSIX_Keys_Control.
Definition
key.h:69
POSIX_Keys_Key_value_pair::Lookup_node
RBTree_Node Lookup_node
The tree node for the lookup tree in Thread_Keys_information.
Definition
key.h:74
POSIX_Keys_Key_value_pair::value
void * value
The thread specific POSIX key value.
Definition
key.h:89
POSIX_Keys_Key_value_pair::thread
Thread_Control * thread
The corresponding thread.
Definition
key.h:84
RBTree_Node
Red-black tree node.
Definition
rbtree.h:73
Chain_Control
This union represents a chain control block.
Definition
chain.h:96
Generated by
1.18.0