diff options
Diffstat (limited to 'os/kernel/src/chqueues.c')
-rw-r--r-- | os/kernel/src/chqueues.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/os/kernel/src/chqueues.c b/os/kernel/src/chqueues.c index 84cbbed94..d1aa03cc6 100644 --- a/os/kernel/src/chqueues.c +++ b/os/kernel/src/chqueues.c @@ -126,6 +126,10 @@ msg_t chIQGetTimeout(InputQueue *iqp, systime_t time) { msg_t msg;
chSysLock();
+
+ if (iqp->q_notify)
+ iqp->q_notify();
+
if ((msg = chSemWaitTimeoutS(&iqp->q_sem, time)) < RDY_OK) {
chSysUnlock();
return msg;
@@ -134,9 +138,6 @@ msg_t chIQGetTimeout(InputQueue *iqp, systime_t time) { if (iqp->q_rdptr >= iqp->q_top)
iqp->q_rdptr = iqp->q_buffer;
- if (iqp->q_notify)
- iqp->q_notify();
-
chSysUnlock();
return b;
}
|