diff options
Diffstat (limited to 'src/chqueues.c')
-rw-r--r-- | src/chqueues.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/chqueues.c b/src/chqueues.c index d0412598b..ddc2cfdff 100644 --- a/src/chqueues.c +++ b/src/chqueues.c @@ -125,8 +125,11 @@ t_msg chIQGetTimeout(Queue *qp, t_time time) { chSysLock();
- if ((msg = chSemWaitTimeoutS(&qp->q_sem, time)) < RDY_OK)
+ if ((msg = chSemWaitTimeoutS(&qp->q_sem, time)) < RDY_OK) {
+
+ chSysUnlock();
return msg;
+ }
b = *qp->q_rdptr++;
if (qp->q_rdptr >= qp->q_top)
qp->q_rdptr = qp->q_buffer;
|