diff options
Diffstat (limited to 'os/rt/include/chthreads.h')
-rw-r--r-- | os/rt/include/chthreads.h | 17 |
1 files changed, 17 insertions, 0 deletions
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_ */
/** @} */
|