From cbd07e4ce0ede36bacf6920bd594579e931b1bdd Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 21 Dec 2012 09:50:15 +0100 Subject: score: Add rtems_chain_node_count_unprotected() --- cpukit/sapi/inline/rtems/chain.inl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cpukit/sapi/inline/rtems') diff --git a/cpukit/sapi/inline/rtems/chain.inl b/cpukit/sapi/inline/rtems/chain.inl index d7f7f7152d..a1bfc2f32e 100644 --- a/cpukit/sapi/inline/rtems/chain.inl +++ b/cpukit/sapi/inline/rtems/chain.inl @@ -645,6 +645,23 @@ RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( return _Chain_Get_with_empty_check( chain, node ); } +/** + * @brief Returns the node count of the chain. + * + * @param[in] chain The chain. + * + * @note It does NOT disable interrupts to ensure the atomicity of the + * operation. + * + * @return The node count of the chain. + */ +RTEMS_INLINE_ROUTINE size_t rtems_chain_node_count_unprotected( + const rtems_chain_control *chain +) +{ + return _Chain_Node_count_unprotected( chain ); +} + /** @} */ #endif -- cgit v1.2.3