summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/key.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-02 15:49:26 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-05 09:30:37 +0200
commit390cfcda71c5bb0d53493210bcf4a15ee29c0498 (patch)
tree52d5af466eef00d0fd8f441f130aeb05131a21c5 /cpukit/posix/include/rtems/posix/key.h
parentrbtree: Add and use RBTree_Compare_result (diff)
downloadrtems-390cfcda71c5bb0d53493210bcf4a15ee29c0498.tar.bz2
posix: Simplify key implementation
Diffstat (limited to 'cpukit/posix/include/rtems/posix/key.h')
-rw-r--r--cpukit/posix/include/rtems/posix/key.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h
index bfa05b1d10..7cc179c3cc 100644
--- a/cpukit/posix/include/rtems/posix/key.h
+++ b/cpukit/posix/include/rtems/posix/key.h
@@ -25,6 +25,7 @@
#include <rtems/score/chain.h>
#include <rtems/score/object.h>
#include <rtems/score/rbtree.h>
+#include <rtems/score/thread.h>
#ifdef __cplusplus
extern "C" {
@@ -39,20 +40,36 @@ extern "C" {
/**@{**/
/**
- * @brief The rbtree node used to manage a POSIX key and value.
+ * @brief Represents POSIX key and value pair.
*/
typedef struct {
- /** This field is the chain node structure. */
+ /**
+ * @brief The chain node for the per-thread value chain.
+ */
Chain_Node Key_values_per_thread_node;
- /** This field is the rbtree node structure. */
+
+ /**
+ * @brief The tree node for the lookup tree.
+ */
RBTree_Node Key_value_lookup_node;
- /** This field is the POSIX key used as an rbtree key */
+
+ /**
+ * @brief The POSIX key identifier used in combination with the thread
+ * pointer as the tree key.
+ */
pthread_key_t key;
- /** This field is the Thread id also used as an rbtree key */
- Objects_Id thread_id;
- /** This field points to the POSIX key value of specific thread */
+
+ /**
+ * @brief The thread pointer used in combination with the POSIX key
+ * identifier as the tree key.
+ */
+ Thread_Control *thread;
+
+ /**
+ * @brief The thread specific POSIX key value.
+ */
const void *value;
-} POSIX_Keys_Key_value_pair;
+} POSIX_Keys_Key_value_pair;
/**
* @brief The data structure used to manage a POSIX key.