summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/sapi/include')
-rw-r--r--cpukit/sapi/include/rtems/chain.h15
-rw-r--r--cpukit/sapi/include/rtems/rbheap.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/sapi/include/rtems/chain.h b/cpukit/sapi/include/rtems/chain.h
index 3d8a860f20..25f02c9ba8 100644
--- a/cpukit/sapi/include/rtems/chain.h
+++ b/cpukit/sapi/include/rtems/chain.h
@@ -188,6 +188,21 @@ RTEMS_INLINE_ROUTINE void rtems_chain_set_off_chain(
}
/**
+ * @brief Initializes a chain node.
+ *
+ * In debug configurations, the node is set off chain. In all other
+ * configurations, this function does nothing.
+ *
+ * @param[in] the_node The chain node to initialize.
+ */
+RTEMS_INLINE_ROUTINE void rtems_chain_initialize_node(
+ rtems_chain_node *node
+)
+{
+ _Chain_Initialize_node( node );
+}
+
+/**
* @brief Is the node off chain.
*
* This function returns true if the @a node is not on a chain. A @a node is
diff --git a/cpukit/sapi/include/rtems/rbheap.h b/cpukit/sapi/include/rtems/rbheap.h
index c008721b23..735aa6c8fd 100644
--- a/cpukit/sapi/include/rtems/rbheap.h
+++ b/cpukit/sapi/include/rtems/rbheap.h
@@ -210,6 +210,7 @@ static inline void rtems_rbheap_add_to_spare_descriptor_chain(
rtems_chain_control *chain =
rtems_rbheap_get_spare_descriptor_chain(control);
+ rtems_chain_initialize_node(&chunk->chain_node);
rtems_chain_prepend_unprotected(chain, &chunk->chain_node);
}