aboutsummaryrefslogtreecommitdiffstats
path: root/src/chevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chevents.c')
-rw-r--r--src/chevents.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/chevents.c b/src/chevents.c
index a38975216..f88412e11 100644
--- a/src/chevents.c
+++ b/src/chevents.c
@@ -205,6 +205,7 @@ t_eventid chEvtWaitTimeout(t_eventmask ewmask,
t_time time) {
t_eventid i;
t_eventmask m;
+ t_msg msg;
chSysLock();
@@ -221,9 +222,10 @@ t_eventid chEvtWaitTimeout(t_eventmask ewmask,
currp->p_ewmask = ewmask;
chSchGoSleepS(PRWTEVENT);
if (!vt.vt_func) {
+ t_msg msg = currp->p_rdymsg;
chSysUnlock();
- return RDY_TIMEOUT; // No need to read t_rdymsg value, it is a timeout.
+ return msg;
}
chVTResetI(&vt);
}