RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
46typedef struct {
51
56
60 pthread_key_t key;
61
66
70 void *value;
72
82
89extern const uint32_t _POSIX_Keys_Key_value_pair_maximum;
90
94typedef 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 */
POSIX_Keys_Key_value_pair _POSIX_Keys_Key_value_pairs[]
The initial set of POSIX key and value pairs.
Definition: keyzerokvp.c:34
const uint32_t _POSIX_Keys_Key_value_pair_maximum
The POSIX key and value pairs maximum.
Definition: keyzerokvp.c:36
Objects_Information _POSIX_Keys_Information
The POSIX Key objects information.
POSIX Threads Private Support.
Constants and Structures Associated with the Red-Black Tree Handler.
Chain Handler API.
Constants and Structures Associated with the Object Handler.
Constants and Structures Related with the Thread Control Block.
Definition: chain.h:68
Definition: objectdata.h:39
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
The data structure used to manage a POSIX key.
Definition: key.h:94
Chain_Control Key_value_pairs
Key value pairs of this key.
Definition: key.h:103
Objects_Control Object
Definition: key.h:96
Represents POSIX key and value pair.
Definition: key.h:46
pthread_key_t key
The POSIX key identifier used as the tree key.
Definition: key.h:60
Chain_Node Key_node
The chain node for the key value pairs chain in POSIX_Keys_Control.
Definition: key.h:50
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
Thread_Control * thread
The corresponding thread.
Definition: key.h:65
Red-black tree node.
Definition: rbtree.h:55
Definition: thread.h:732
Definition: chain.h:86