summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems/rbtree.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/sapi/include/rtems/rbtree.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/cpukit/sapi/include/rtems/rbtree.h b/cpukit/sapi/include/rtems/rbtree.h
index 68f4ec697e..9a09b27650 100644
--- a/cpukit/sapi/include/rtems/rbtree.h
+++ b/cpukit/sapi/include/rtems/rbtree.h
@@ -43,6 +43,29 @@ typedef RBTree_Node rtems_rbtree_node;
typedef RBTree_Control rtems_rbtree_control;
/**
+ * @typedef rtems_rbtree_compare_function
+ *
+ * This type defines function pointers for user-provided comparison
+ * function. The function compares two nodes in order to determine
+ * the order in a red-black tree.
+ */
+typedef RBTree_Compare_function rtems_rbtree_compare_function;
+
+/**
+ * @typedef rtems_rbtree_unique
+ *
+ * This enum type defines whether the tree can contain nodes with
+ * duplicate keys.
+ */
+typedef enum {
+ /** The tree is not unique, insertion of duplicate keys is performed
+ * in a FIFO manner. */
+ RTEMS_RBTREE_DUPLICATE = false,
+ /** The tree is unique, insertion of duplicate key is refused. */
+ RTEMS_RBTREE_UNIQUE = true
+} rtems_rbtree_unique;
+
+/**
* @brief RBTree initializer for an empty rbtree with designator @a name.
*/
#define RTEMS_RBTREE_INITIALIZER_EMPTY(name) \