summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/keygetspecific.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-04 08:18:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-06 09:08:21 +0200
commit9ea69deef0257cb54f2f551bdb60a8d587260135 (patch)
treeca803e08a658963d67c227ddc0d4380726c72de9 /cpukit/posix/src/keygetspecific.c
parentposix: Fix _POSIX_signals_Check_signal() (diff)
downloadrtems-9ea69deef0257cb54f2f551bdb60a8d587260135.tar.bz2
score: Add node map to _RBTree_Find_inline()
Diffstat (limited to 'cpukit/posix/src/keygetspecific.c')
-rw-r--r--cpukit/posix/src/keygetspecific.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c
index 08ac1ed28c..ae29955d80 100644
--- a/cpukit/posix/src/keygetspecific.c
+++ b/cpukit/posix/src/keygetspecific.c
@@ -30,20 +30,17 @@ void *pthread_getspecific(
pthread_key_t key
)
{
- Thread_Control *executing;
- ISR_lock_Context lock_context;
- RBTree_Node *node;
- void *value;
+ Thread_Control *executing;
+ ISR_lock_Context lock_context;
+ POSIX_Keys_Key_value_pair *key_value_pair;
+ void *value;
executing = _Thread_Get_executing();
_POSIX_Keys_Key_value_acquire( executing, &lock_context );
- node = _POSIX_Keys_Key_value_find( key, executing );
+ key_value_pair = _POSIX_Keys_Key_value_find( key, executing );
- if ( node != NULL ) {
- POSIX_Keys_Key_value_pair *key_value_pair;
-
- key_value_pair = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( node );
+ if ( key_value_pair != NULL ) {
value = key_value_pair->value;
} else {
value = NULL;