From 74f1c73e969fe7a7b1ca53bb6fcb1336f4a179cb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 21 Aug 2011 20:07:11 +0000 Subject: 2011-08-21 Petr Benes 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. --- cpukit/score/src/rbtree.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cpukit/score/src/rbtree.c') 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; -- cgit v1.2.3