From d280fa562665332f9d9f791819942387582b2fd4 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 3 Oct 2017 08:54:55 +0000 Subject: Documentation fixes and a new wrapper function. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10748 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/oslib/include/chfifo.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'os/common/oslib/include') diff --git a/os/common/oslib/include/chfifo.h b/os/common/oslib/include/chfifo.h index 8727fff84..9f18bac09 100644 --- a/os/common/oslib/include/chfifo.h +++ b/os/common/oslib/include/chfifo.h @@ -157,7 +157,28 @@ static inline void *chFifoTakeObjectI(objects_fifo_t *ofp) { * @retval NULL if an object is not available within the specified * timeout. * - * @iclass + * @sclass + */ +static inline void *chFifoTakeObjectTimeoutS(objects_fifo_t *ofp, + systime_t timeout) { + + return chGuardedPoolAllocTimeoutS(&ofp->free, timeout); +} + +/** + * @brief Allocates a free object. + * + * @param[in] ofp pointer to a @p objects_fifo_t structure + * @param[in] timeout the number of ticks before the operation timeouts, + * the following special values are allowed: + * - @a TIME_IMMEDIATE immediate timeout. + * - @a TIME_INFINITE no timeout. + * . + * @return The pointer to the allocated object. + * @retval NULL if an object is not available within the specified + * timeout. + * + * @api */ static inline void *chFifoTakeObjectTimeout(objects_fifo_t *ofp, systime_t timeout) { @@ -253,7 +274,7 @@ static inline void chFifoSendObject(objects_fifo_t *ofp, void *objp) { * @retval MSG_OK if an object has been correctly fetched. * @retval MSG_TIMEOUT if the FIFO is empty and a message cannot be fetched. * - * @api + * @iclass */ static inline msg_t chFifoReceiveObjectI(objects_fifo_t *ofp, void **objpp) { -- cgit v1.2.3