diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-03 08:54:55 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-03 08:54:55 +0000 |
commit | d280fa562665332f9d9f791819942387582b2fd4 (patch) | |
tree | 78b66c3f9844da1c86db3eb420f1ace9ccd2df19 | |
parent | 7d2486a57ad2f63c30d00d1d4302e82e10467633 (diff) | |
download | ChibiOS-d280fa562665332f9d9f791819942387582b2fd4.tar.gz ChibiOS-d280fa562665332f9d9f791819942387582b2fd4.tar.bz2 ChibiOS-d280fa562665332f9d9f791819942387582b2fd4.zip |
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
-rw-r--r-- | os/common/oslib/include/chfifo.h | 25 |
1 files changed, 23 insertions, 2 deletions
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) {
|