diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-08-21 20:07:11 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-08-21 20:07:11 +0000 |
commit | 74f1c73e969fe7a7b1ca53bb6fcb1336f4a179cb (patch) | |
tree | 4f2b74ad7cf7f1c661bdfd0cd89c284964ad2f64 /cpukit/score/src/rbtree.c | |
parent | 2011-08-21 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-74f1c73e969fe7a7b1ca53bb6fcb1336f4a179cb.tar.bz2 |
2011-08-21 Petr Benes <benesp16@fel.cvut.cz>
PR 1886/cpukit
* sapi/include/rtems/rbtree.h, sapi/inline/rtems/rbtree.inl,
score/include/rtems/score/rbtree.h,
score/inline/rtems/score/rbtree.inl, score/src/rbtree.c,
score/src/rbtreeinsert.c: This patch enables inserting duplicate keys
into rbtree. It is possible to turn on this feature when initializing
the tree.
Diffstat (limited to 'cpukit/score/src/rbtree.c')
-rw-r--r-- | cpukit/score/src/rbtree.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpukit/score/src/rbtree.c b/cpukit/score/src/rbtree.c index eb3af773cb..e0fc560229 100644 --- a/cpukit/score/src/rbtree.c +++ b/cpukit/score/src/rbtree.c @@ -32,11 +32,12 @@ */ void _RBTree_Initialize( - RBTree_Control *the_rbtree, - void *compare_function, - void *starting_address, - size_t number_nodes, - size_t node_size + RBTree_Control *the_rbtree, + RBTree_Compare_function compare_function, + void *starting_address, + size_t number_nodes, + size_t node_size, + bool is_unique ) { size_t count; @@ -46,7 +47,7 @@ void _RBTree_Initialize( if (!the_rbtree) return; /* could do sanity checks here */ - _RBTree_Initialize_empty(the_rbtree, compare_function); + _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; |