RTEMS: cpukit/include/rtems/posix/key.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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
32extern "C" {
33#endif
34
46 typedef struct {
50 Chain_Node Key_node;
51
55 RBTree_Node Lookup_node;
56
60 pthread_key_t key;
61
65 Thread_Control *thread;
66
70 void *value;
71} POSIX_Keys_Key_value_pair;
72
81extern POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[];
82
89extern const uint32_t _POSIX_Keys_Key_value_pair_maximum;
90
94 typedef struct {
96 Objects_Control Object;
98 void (*destructor) (void *);
99
103 Chain_Control Key_value_pairs;
104 } POSIX_Keys_Control;
105
109extern Objects_Information _POSIX_Keys_Information;
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 */
_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
Constants and Structures Associated with the Red-Black Tree Handler.
chain.h
Chain Handler API.
object.h
Constants and Structures Associated with the Object Handler.
thread.h
Constants and Structures Related with the Thread Control Block.
Chain_Node_struct
Definition: chain.h:68
Objects_Control
Definition: objectdata.h:39
Objects_Information
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
POSIX_Keys_Control
The data structure used to manage a POSIX key.
Definition: key.h:94
POSIX_Keys_Control::Key_value_pairs
Chain_Control Key_value_pairs
Key value pairs of this key.
Definition: key.h:103
POSIX_Keys_Control::Object
Objects_Control Object
Definition: key.h:96
POSIX_Keys_Key_value_pair
Represents POSIX key and value pair.
Definition: key.h:46
POSIX_Keys_Key_value_pair::key
pthread_key_t key
The POSIX key identifier used as the tree key.
Definition: key.h:60
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:50
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:55
POSIX_Keys_Key_value_pair::value
void * value
The thread specific POSIX key value.
Definition: key.h:70
POSIX_Keys_Key_value_pair::thread
Thread_Control * thread
The corresponding thread.
Definition: key.h:65
RBTree_Node
Red-black tree node.
Definition: rbtree.h:55
_Thread_Control
Definition: thread.h:732
Chain_Control
Definition: chain.h:86