summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/rbtree.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-03 13:02:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-05 09:30:37 +0200
commit60fe374247eba365afb7f1a7055298af575434c7 (patch)
treec3323eaf5c6939c5c9e4fd64671a443dcd521150 /cpukit/score/include/rtems/score/rbtree.h
parentAdd and use RTEMS_CONTAINER_OF() (diff)
downloadrtems-60fe374247eba365afb7f1a7055298af575434c7.tar.bz2
rbtree: Add and use RBTree_Compare_result
Diffstat (limited to '')
-rw-r--r--cpukit/score/include/rtems/score/rbtree.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h
index d23808ffd4..aa84558721 100644
--- a/cpukit/score/include/rtems/score/rbtree.h
+++ b/cpukit/score/include/rtems/score/rbtree.h
@@ -90,6 +90,15 @@ typedef enum {
} RBTree_Direction;
/**
+ * @brief Integer type for compare results.
+ *
+ * The type is large enough to represent pointers and 32-bit signed integers.
+ *
+ * @see RBTree_Compare.
+ */
+typedef long RBTree_Compare_result;
+
+/**
* @brief Compares two red-black tree nodes.
*
* @param[in] first The first node.
@@ -102,7 +111,7 @@ typedef enum {
* @retval negative The key value of the first node is less than the one of the
* second node.
*/
-typedef int ( *RBTree_Compare )(
+typedef RBTree_Compare_result ( *RBTree_Compare )(
const RBTree_Node *first,
const RBTree_Node *second
);