RTEMS  5.0.0
key.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright (c) 2012 Zhongwei Yao.
12  * COPYRIGHT (c) 1989-2011.
13  * On-Line Applications Research Corporation (OAR).
14  * Copyright (c) 2016 embedded brains GmbH.
15  *
16  * The license and distribution terms for this file may be
17  * found in the file LICENSE in this distribution or at
18  * http://www.rtems.org/license/LICENSE.
19  */
20 
21 #ifndef _RTEMS_POSIX_KEY_H
22 #define _RTEMS_POSIX_KEY_H
23 
24 #include <pthread.h>
25 
26 #include <rtems/score/chain.h>
27 #include <rtems/score/object.h>
28 #include <rtems/score/rbtree.h>
29 #include <rtems/score/thread.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
46 typedef struct {
51 
56 
60  pthread_key_t key;
61 
66 
70  void *value;
72 
82 
89 extern const uint32_t _POSIX_Keys_Key_value_pair_maximum;
90 
94 typedef struct {
98  void (*destructor) (void *);
99 
105 
110 
119 #define POSIX_KEYS_INFORMATION_DEFINE( max ) \
120  OBJECTS_INFORMATION_DEFINE( \
121  _POSIX_Keys, \
122  OBJECTS_POSIX_API, \
123  OBJECTS_POSIX_KEYS, \
124  POSIX_Keys_Control, \
125  max, \
126  OBJECTS_NO_STRING_NAME, \
127  NULL \
128  )
129 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif
137 /* end of include file */
Definition: chain.h:65
Definition: objectdata.h:39
POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[]
The initial set of POSIX key and value pairs.
Definition: keyzerokvp.c:34
Constants and Structures Associated with the Object Handler.
Definition: chain.h:83
Represents POSIX key and value pair.
Definition: key.h:46
POSIX Threads Private Support.
Red-black tree node.
Definition: rbtree.h:50
Chain_Node Key_node
The chain node for the key value pairs chain in POSIX_Keys_Control.
Definition: key.h:50
Definition: thread.h:728
Objects_Information _POSIX_Keys_Information
The POSIX Key objects information.
Chain_Control Key_value_pairs
Key value pairs of this key.
Definition: key.h:103
Constants and Structures Associated with the Red-Black Tree Handler.
The information structure used to manage each API class of objects.
Definition: objectdata.h:160
RBTree_Node Lookup_node
The tree node for the lookup tree in Thread_Keys_information.
Definition: key.h:55
void * value
The thread specific POSIX key value.
Definition: key.h:70
Chain Handler API.
Thread_Control * thread
The corresponding thread.
Definition: key.h:65
The data structure used to manage a POSIX key.
Definition: key.h:94
const uint32_t _POSIX_Keys_Key_value_pair_maximum
The POSIX key and value pairs maximum.
Definition: keyzerokvp.c:36
pthread_key_t key
The POSIX key identifier used as the tree key.
Definition: key.h:60
Constants and Structures Related with the Thread Control Block.
Objects_Control Object
Definition: key.h:96