diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-12 14:22:22 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-07-15 10:03:48 -0500 |
commit | 64939bc9efcaf945b493e9c371901de33c3868a3 (patch) | |
tree | e196959688afe714c8c334f93598cb99234970e4 /cpukit/posix/src/keygetspecific.c | |
parent | rbtree: Delete unused functions (diff) | |
download | rtems-64939bc9efcaf945b493e9c371901de33c3868a3.tar.bz2 |
rbtree: Reduce RBTree_Control size
Remove compare function and is unique indicator from the control
structure. Rename RBTree_Compare_function to RBTree_Compare. Rename
rtems_rbtree_compare_function to rtems_rbtree_compare. Provide C++
compatible initializers. Add compare function and is unique indicator
to _RBTree_Find(), _RBTree_Insert(), rtems_rbtree_find() and
rtems_rbtree_insert(). Remove _RBTree_Is_unique() and
rtems_rbtree_is_unique(). Remove compare function and is unique
indicator from _RBTree_Initialize_empty() and
rtems_rbtree_initialize_empty().
Diffstat (limited to 'cpukit/posix/src/keygetspecific.c')
-rw-r--r-- | cpukit/posix/src/keygetspecific.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c index eeab2e3130..9c54112fde 100644 --- a/cpukit/posix/src/keygetspecific.c +++ b/cpukit/posix/src/keygetspecific.c @@ -49,19 +49,14 @@ void *pthread_getspecific( switch ( location ) { case OBJECTS_LOCAL: - search_node.key = key; - search_node.thread_id = _Thread_Executing->Object.id; - p = _RBTree_Find( &_POSIX_Keys_Key_value_lookup_tree, - &search_node.Key_value_lookup_node ); - key_data = NULL; - if ( p ) { + p = _POSIX_Keys_Find( key, _Thread_Executing->Object.id, &search_node ); + if ( p != NULL ) { value_pair_p = _RBTree_Container_of( p, POSIX_Keys_Key_value_pair, Key_value_lookup_node ); - /* key_data = _RBTree_Container_of( p, */ - /* POSIX_Keys_Key_value_pair, */ - /* Key_value_lookup_node )->value; */ key_data = value_pair_p->value; + } else { + key_data = NULL; } _Objects_Put( &the_key->Object ); |