diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-12 08:37:47 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-12 08:37:47 +0000 |
commit | 286deccd1280b0d66ccc6d9b2617719582607f0d (patch) | |
tree | 26c4066c47d36dd4dbeaea4c48c8ac9b3da3a4e7 /os/rt/src/chevents.c | |
parent | b172abc34df730bea1487f9d2fe518a9b3d098b9 (diff) | |
download | ChibiOS-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/chevents.c')
-rw-r--r-- | os/rt/src/chevents.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/os/rt/src/chevents.c b/os/rt/src/chevents.c index 63740d50b..a4338d70a 100644 --- a/os/rt/src/chevents.c +++ b/os/rt/src/chevents.c @@ -482,7 +482,7 @@ eventmask_t chEvtWaitAll(eventmask_t events) { *
* @param[in] events events that the function should wait
* for, @p ALL_EVENTS enables all the events
- * @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.
@@ -492,19 +492,19 @@ eventmask_t chEvtWaitAll(eventmask_t events) { *
* @api
*/
-eventmask_t chEvtWaitOneTimeout(eventmask_t events, systime_t time) {
+eventmask_t chEvtWaitOneTimeout(eventmask_t events, sysinterval_t timeout) {
thread_t *ctp = currp;
eventmask_t m;
chSysLock();
m = ctp->epending & events;
if (m == (eventmask_t)0) {
- if (TIME_IMMEDIATE == time) {
+ if (TIME_IMMEDIATE == timeout) {
chSysUnlock();
return (eventmask_t)0;
}
ctp->u.ewmask = events;
- if (chSchGoSleepTimeoutS(CH_STATE_WTOREVT, time) < MSG_OK) {
+ if (chSchGoSleepTimeoutS(CH_STATE_WTOREVT, timeout) < MSG_OK) {
chSysUnlock();
return (eventmask_t)0;
}
@@ -525,7 +525,7 @@ eventmask_t chEvtWaitOneTimeout(eventmask_t events, systime_t time) { *
* @param[in] events events that the function should wait
* for, @p ALL_EVENTS enables all the events
- * @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.
@@ -535,19 +535,19 @@ eventmask_t chEvtWaitOneTimeout(eventmask_t events, systime_t time) { *
* @api
*/
-eventmask_t chEvtWaitAnyTimeout(eventmask_t events, systime_t time) {
+eventmask_t chEvtWaitAnyTimeout(eventmask_t events, sysinterval_t timeout) {
thread_t *ctp = currp;
eventmask_t m;
chSysLock();
m = ctp->epending & events;
if (m == (eventmask_t)0) {
- if (TIME_IMMEDIATE == time) {
+ if (TIME_IMMEDIATE == timeout) {
chSysUnlock();
return (eventmask_t)0;
}
ctp->u.ewmask = events;
- if (chSchGoSleepTimeoutS(CH_STATE_WTOREVT, time) < MSG_OK) {
+ if (chSchGoSleepTimeoutS(CH_STATE_WTOREVT, timeout) < MSG_OK) {
chSysUnlock();
return (eventmask_t)0;
}
@@ -566,7 +566,7 @@ eventmask_t chEvtWaitAnyTimeout(eventmask_t events, systime_t time) { *
* @param[in] events events that the function should wait
* for, @p ALL_EVENTS requires all the events
- * @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.
@@ -576,17 +576,17 @@ eventmask_t chEvtWaitAnyTimeout(eventmask_t events, systime_t time) { *
* @api
*/
-eventmask_t chEvtWaitAllTimeout(eventmask_t events, systime_t time) {
+eventmask_t chEvtWaitAllTimeout(eventmask_t events, sysinterval_t timeout) {
thread_t *ctp = currp;
chSysLock();
if ((ctp->epending & events) != events) {
- if (TIME_IMMEDIATE == time) {
+ if (TIME_IMMEDIATE == timeout) {
chSysUnlock();
return (eventmask_t)0;
}
ctp->u.ewmask = events;
- if (chSchGoSleepTimeoutS(CH_STATE_WTANDEVT, time) < MSG_OK) {
+ if (chSchGoSleepTimeoutS(CH_STATE_WTANDEVT, timeout) < MSG_OK) {
chSysUnlock();
return (eventmask_t)0;
}
|