From 286deccd1280b0d66ccc6d9b2617719582607f0d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 12 Oct 2017 08:37:47 +0000 Subject: EXPERIMENTAL: Introduced sysinterval_t in RT, now system time and intervals are different types and could have different sizes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10812 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/oslib/include/chbsem.h | 12 ++++++------ os/common/oslib/include/chfifo.h | 8 ++++---- os/common/oslib/include/chmboxes.h | 12 ++++++------ os/common/oslib/include/chmempools.h | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'os/common/oslib/include') diff --git a/os/common/oslib/include/chbsem.h b/os/common/oslib/include/chbsem.h index 3a6956017..bf77700d1 100644 --- a/os/common/oslib/include/chbsem.h +++ b/os/common/oslib/include/chbsem.h @@ -166,7 +166,7 @@ static inline msg_t chBSemWaitS(binary_semaphore_t *bsp) { * @brief Wait operation on the binary semaphore. * * @param[in] bsp pointer to a @p binary_semaphore_t structure - * @param[in] time the number of ticks before the operation timeouts, + * @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. @@ -182,18 +182,18 @@ static inline msg_t chBSemWaitS(binary_semaphore_t *bsp) { * @sclass */ static inline msg_t chBSemWaitTimeoutS(binary_semaphore_t *bsp, - systime_t time) { + sysinterval_t timeout) { chDbgCheckClassS(); - return chSemWaitTimeoutS(&bsp->sem, time); + return chSemWaitTimeoutS(&bsp->sem, timeout); } /** * @brief Wait operation on the binary semaphore. * * @param[in] bsp pointer to a @p binary_semaphore_t structure - * @param[in] time the number of ticks before the operation timeouts, + * @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. @@ -209,9 +209,9 @@ static inline msg_t chBSemWaitTimeoutS(binary_semaphore_t *bsp, * @api */ static inline msg_t chBSemWaitTimeout(binary_semaphore_t *bsp, - systime_t time) { + sysinterval_t timeout) { - return chSemWaitTimeout(&bsp->sem, time); + return chSemWaitTimeout(&bsp->sem, timeout); } /** diff --git a/os/common/oslib/include/chfifo.h b/os/common/oslib/include/chfifo.h index 1df57ef41..78ba16132 100644 --- a/os/common/oslib/include/chfifo.h +++ b/os/common/oslib/include/chfifo.h @@ -164,7 +164,7 @@ static inline void *chFifoTakeObjectI(objects_fifo_t *ofp) { * @sclass */ static inline void *chFifoTakeObjectTimeoutS(objects_fifo_t *ofp, - systime_t timeout) { + sysinterval_t timeout) { return chGuardedPoolAllocTimeoutS(&ofp->free, timeout); } @@ -185,7 +185,7 @@ static inline void *chFifoTakeObjectTimeoutS(objects_fifo_t *ofp, * @api */ static inline void *chFifoTakeObjectTimeout(objects_fifo_t *ofp, - systime_t timeout) { + sysinterval_t timeout) { return chGuardedPoolAllocTimeout(&ofp->free, timeout); } @@ -304,7 +304,7 @@ static inline msg_t chFifoReceiveObjectI(objects_fifo_t *ofp, */ static inline msg_t chFifoReceiveObjectTimeoutS(objects_fifo_t *ofp, void **objpp, - systime_t timeout) { + sysinterval_t timeout) { return chMBFetchTimeoutS(&ofp->mbx, (msg_t *)objpp, timeout); } @@ -327,7 +327,7 @@ static inline msg_t chFifoReceiveObjectTimeoutS(objects_fifo_t *ofp, */ static inline msg_t chFifoReceiveObjectTimeout(objects_fifo_t *ofp, void **objpp, - systime_t timeout) { + sysinterval_t timeout) { return chMBFetchTimeout(&ofp->mbx, (msg_t *)objpp, timeout); } diff --git a/os/common/oslib/include/chmboxes.h b/os/common/oslib/include/chmboxes.h index e6ffd7b82..2c9d09296 100644 --- a/os/common/oslib/include/chmboxes.h +++ b/os/common/oslib/include/chmboxes.h @@ -112,14 +112,14 @@ extern "C" { void chMBObjectInit(mailbox_t *mbp, msg_t *buf, size_t n); void chMBReset(mailbox_t *mbp); void chMBResetI(mailbox_t *mbp); - msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, systime_t timeout); - msg_t chMBPostTimeoutS(mailbox_t *mbp, msg_t msg, systime_t timeout); + msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout); + msg_t chMBPostTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout); msg_t chMBPostI(mailbox_t *mbp, msg_t msg); - msg_t chMBPostAheadTimeout(mailbox_t *mbp, msg_t msg, systime_t timeout); - msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, systime_t timeout); + msg_t chMBPostAheadTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout); + msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout); msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg); - msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, systime_t timeout); - msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, systime_t timeout); + msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout); + msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout); msg_t chMBFetchI(mailbox_t *mbp, msg_t *msgp); #ifdef __cplusplus } diff --git a/os/common/oslib/include/chmempools.h b/os/common/oslib/include/chmempools.h index 0e9773374..1923404b3 100644 --- a/os/common/oslib/include/chmempools.h +++ b/os/common/oslib/include/chmempools.h @@ -164,9 +164,9 @@ extern "C" { unsigned align); void chGuardedPoolLoadArray(guarded_memory_pool_t *gmp, void *p, size_t n); void *chGuardedPoolAllocTimeoutS(guarded_memory_pool_t *gmp, - systime_t timeout); + sysinterval_t timeout); void *chGuardedPoolAllocTimeout(guarded_memory_pool_t *gmp, - systime_t timeout); + sysinterval_t timeout); void chGuardedPoolFreeI(guarded_memory_pool_t *gmp, void *objp); void chGuardedPoolFree(guarded_memory_pool_t *gmp, void *objp); #endif -- cgit v1.2.3