aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chsem.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-10-12 08:37:47 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-10-12 08:37:47 +0000
commit286deccd1280b0d66ccc6d9b2617719582607f0d (patch)
tree26c4066c47d36dd4dbeaea4c48c8ac9b3da3a4e7 /os/rt/src/chsem.c
parentb172abc34df730bea1487f9d2fe518a9b3d098b9 (diff)
downloadChibiOS-286deccd1280b0d66ccc6d9b2617719582607f0d.tar.gz
ChibiOS-286deccd1280b0d66ccc6d9b2617719582607f0d.tar.bz2
ChibiOS-286deccd1280b0d66ccc6d9b2617719582607f0d.zip
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
Diffstat (limited to 'os/rt/src/chsem.c')
-rw-r--r--os/rt/src/chsem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/os/rt/src/chsem.c b/os/rt/src/chsem.c
index 90df0dd73..c41ff4d78 100644
--- a/os/rt/src/chsem.c
+++ b/os/rt/src/chsem.c
@@ -217,7 +217,7 @@ msg_t chSemWaitS(semaphore_t *sp) {
* @brief Performs a wait operation on a semaphore with timeout specification.
*
* @param[in] sp pointer to a @p 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.
@@ -232,11 +232,11 @@ msg_t chSemWaitS(semaphore_t *sp) {
*
* @api
*/
-msg_t chSemWaitTimeout(semaphore_t *sp, systime_t time) {
+msg_t chSemWaitTimeout(semaphore_t *sp, sysinterval_t timeout) {
msg_t msg;
chSysLock();
- msg = chSemWaitTimeoutS(sp, time);
+ msg = chSemWaitTimeoutS(sp, timeout);
chSysUnlock();
return msg;
@@ -246,7 +246,7 @@ msg_t chSemWaitTimeout(semaphore_t *sp, systime_t time) {
* @brief Performs a wait operation on a semaphore with timeout specification.
*
* @param[in] sp pointer to a @p 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.
@@ -261,7 +261,7 @@ msg_t chSemWaitTimeout(semaphore_t *sp, systime_t time) {
*
* @sclass
*/
-msg_t chSemWaitTimeoutS(semaphore_t *sp, systime_t time) {
+msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout) {
chDbgCheckClassS();
chDbgCheck(sp != NULL);
@@ -270,7 +270,7 @@ msg_t chSemWaitTimeoutS(semaphore_t *sp, systime_t time) {
"inconsistent semaphore");
if (--sp->cnt < (cnt_t)0) {
- if (TIME_IMMEDIATE == time) {
+ if (TIME_IMMEDIATE == timeout) {
sp->cnt++;
return MSG_TIMEOUT;
@@ -278,7 +278,7 @@ msg_t chSemWaitTimeoutS(semaphore_t *sp, systime_t time) {
currp->u.wtsemp = sp;
sem_insert(currp, &sp->queue);
- return chSchGoSleepTimeoutS(CH_STATE_WTSEM, time);
+ return chSchGoSleepTimeoutS(CH_STATE_WTSEM, timeout);
}
return MSG_OK;