From 3b9ae6825f753e21f2db109d7b1005a6acfe475c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 10 Sep 2014 12:35:59 +0000 Subject: Added function chThdQueueIsEmptyI(), fixed a naming error in threads queues static initializer. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7255 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chthreads.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'os/rt/include/chthreads.h') diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h index 03ac3fba7..ca2d3bcbc 100644 --- a/os/rt/include/chthreads.h +++ b/os/rt/include/chthreads.h @@ -376,6 +376,23 @@ static inline void chThdQueueObjectInit(threads_queue_t *tqp) { queue_init(tqp); } +/** + * @brief Evaluates to @p true if the specified queue is empty. + * + * @param[out] tqp pointer to the threads queue object + * @return The queue status. + * @retval false if the queue is not empty. + * @retval true if the queue is empty. + * + * @iclass + */ +static inline bool chThdQueueIsEmptyI(threads_queue_t *tqp) { + + chDbgCheckClassI(); + + return queue_isempty(tqp); +} + #endif /* _CHTHREADS_H_ */ /** @} */ -- cgit v1.2.3