diff options
Diffstat (limited to 'src/chevents.c')
-rw-r--r-- | src/chevents.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/chevents.c b/src/chevents.c index f88412e11..a617e3edf 100644 --- a/src/chevents.c +++ b/src/chevents.c @@ -205,7 +205,6 @@ t_eventid chEvtWaitTimeout(t_eventmask ewmask, t_time time) {
t_eventid i;
t_eventmask m;
- t_msg msg;
chSysLock();
@@ -221,11 +220,10 @@ t_eventid chEvtWaitTimeout(t_eventmask ewmask, chVTSetI(&vt, time, unwait, currp);
currp->p_ewmask = ewmask;
chSchGoSleepS(PRWTEVENT);
- if (!vt.vt_func) {
- t_msg msg = currp->p_rdymsg;
+ if (!chVTIsArmedI(&vt)) {
chSysUnlock();
- return msg;
+ return RDY_TIMEOUT;
}
chVTResetI(&vt);
}
|