Ignore:
Timestamp:
Jul 12, 2014, 7:22:22 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
ed7a028
Parents:
7e119990
git-author:
Sebastian Huber <sebastian.huber@…> (07/12/14 19:22:22)
git-committer:
Joel Sherrill <joel.sherrill@…> (07/15/14 15:03:48)
Message:

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().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/rtems/posix/keyimpl.h

    r7e119990 r64939bc  
    4343 * @brief The rbtree control block used to manage all key values
    4444 */
    45 POSIX_EXTERN RBTree_Control _POSIX_Keys_Key_value_lookup_tree;
     45extern RBTree_Control _POSIX_Keys_Key_value_lookup_tree;
    4646
    4747/**
     
    6262 * This routine compares the rbtree node
    6363 */
    64 int _POSIX_Keys_Key_value_lookup_tree_compare_function(
     64int _POSIX_Keys_Key_value_compare(
    6565  const RBTree_Node *node1,
    6666  const RBTree_Node *node2
     
    166166}
    167167
     168RTEMS_INLINE_ROUTINE RBTree_Node *_POSIX_Keys_Find(
     169  pthread_key_t              key,
     170  Objects_Id                 thread_id,
     171  POSIX_Keys_Key_value_pair *search_node
     172)
     173{
     174  search_node->key = key;
     175  search_node->thread_id = thread_id;
     176
     177  return _RBTree_Find(
     178    &_POSIX_Keys_Key_value_lookup_tree,
     179    &search_node->Key_value_lookup_node,
     180    _POSIX_Keys_Key_value_compare,
     181    true
     182  );
     183}
     184
    168185/** @} */
    169186
Note: See TracChangeset for help on using the changeset viewer.