45#ifndef _RTEMS_POSIX_KEYIMPL_H
46#define _RTEMS_POSIX_KEYIMPL_H
63#define POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( node ) \
64 RTEMS_CONTAINER_OF( node, POSIX_Keys_Key_value_pair, Lookup_node )
84static inline void _POSIX_Keys_Free(
97static inline void _POSIX_Keys_Key_value_acquire(
105static inline void _POSIX_Keys_Key_value_release(
115static inline void _POSIX_Keys_Key_value_free(
119 _Chain_Extract_unprotected( &key_value_pair->
Key_node );
123static inline bool _POSIX_Keys_Key_value_equal(
128 const pthread_key_t *the_left;
132 the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
134 return *the_left == the_right->
key;
137static inline bool _POSIX_Keys_Key_value_less(
142 const pthread_key_t *the_left;
146 the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
148 return *the_left < the_right->
key;
151static inline void *_POSIX_Keys_Key_value_map(
RBTree_Node *node )
153 return POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( node );
161 return _RBTree_Find_inline(
164 _POSIX_Keys_Key_value_equal,
165 _POSIX_Keys_Key_value_less,
166 _POSIX_Keys_Key_value_map
170static inline void _POSIX_Keys_Key_value_insert(
176 _RBTree_Insert_inline(
180 _POSIX_Keys_Key_value_less
This header file provides interfaces of the Chain Handler which are only used by the implementation.
This header file provides interfaces of the Barrier Handler which are only used by the implementation...
Freechain_Control _POSIX_Keys_Keypool
This freechain is used as a memory pool for POSIX_Keys_Key_value_pair.
Definition: keycreate.c:74
Objects_Information _POSIX_Keys_Information
The POSIX Key objects information.
void _Freechain_Put(Freechain_Control *freechain, void *node)
Puts a node back onto the freechain.
Definition: freechain.c:87
#define _ISR_lock_Release_and_ISR_enable(_lock, _context)
Releases an ISR lock.
Definition: isrlock.h:279
#define _ISR_lock_ISR_disable_and_acquire(_lock, _context)
Acquires an ISR lock.
Definition: isrlock.h:254
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:43
uint32_t Objects_Id
Definition: object.h:101
Objects_Control * _Objects_Get_no_protection(Objects_Id id, const Objects_Information *information)
Maps object ids to object control blocks.
Definition: objectgetnoprotection.c:44
POSIX Key Private Support.
This header file provides interfaces of the Object Handler which are only used by the implementation.
This header file provides the interfaces of the Per-CPU Information.
The freechain control.
Definition: freechain.h:64
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:81
The data structure used to manage a POSIX key.
Definition: key.h:113
Objects_Control Object
Definition: key.h:115
Represents POSIX key and value pair.
Definition: key.h:65
pthread_key_t key
The POSIX key identifier used as the tree key.
Definition: key.h:79
Chain_Node Key_node
The chain node for the key value pairs chain in POSIX_Keys_Control.
Definition: key.h:69
RBTree_Node Lookup_node
The tree node for the lookup tree in Thread_Keys_information.
Definition: key.h:74
Red-black tree node.
Definition: rbtree.h:73
Thread_Keys_information Keys
The POSIX Keys information.
Definition: thread.h:943