diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-17 07:38:17 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:37:11 +0200 |
commit | 768c483b7063025dfd130b29dc3466b6360042e0 (patch) | |
tree | fbddff076e67f787bb21c4c8d82dcc50a6cc1335 /cpukit/sapi/include | |
parent | score: Rework EDF scheduler (diff) | |
download | rtems-768c483b7063025dfd130b29dc3466b6360042e0.tar.bz2 |
score: Move _RBTree_Insert()
The _RBTree_Insert() is no longer used in the score. Move it to sapi
and make it rtems_rbtree_insert().
Diffstat (limited to 'cpukit/sapi/include')
-rw-r--r-- | cpukit/sapi/include/rtems/rbtree.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/cpukit/sapi/include/rtems/rbtree.h b/cpukit/sapi/include/rtems/rbtree.h index 271e4b5a6d..2b43eaaae1 100644 --- a/cpukit/sapi/include/rtems/rbtree.h +++ b/cpukit/sapi/include/rtems/rbtree.h @@ -378,17 +378,27 @@ RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_peek_max( } /** - * @copydoc _RBTree_Insert() - */ -RTEMS_INLINE_ROUTINE rtems_rbtree_node *rtems_rbtree_insert( - rtems_rbtree_control *the_rbtree, - rtems_rbtree_node *the_node, - rtems_rbtree_compare compare, - bool is_unique -) -{ - return _RBTree_Insert( the_rbtree, the_node, compare, is_unique ); -} + * @brief Inserts the node into the red-black tree. + * + * In case the node is already a node of a tree, then this function yields + * unpredictable results. + * + * @param[in] the_rbtree The red-black tree control. + * @param[in] the_node The node to insert. + * @param[in] compare The node compare function. + * @param[in] is_unique If true, then reject nodes with a duplicate key, else + * insert nodes in FIFO order in case the key value is equal to existing nodes. + * + * @retval NULL Successfully inserted. + * @retval existing_node This is a unique insert and there exists a node with + * an equal key in the tree already. + */ +rtems_rbtree_node *rtems_rbtree_insert( + RBTree_Control *the_rbtree, + RBTree_Node *the_node, + RBTree_Compare compare, + bool is_unique +); /** @} */ |