diff options
-rw-r--r-- | firmware/kernel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c index 0b39e29126..a264ceb9e4 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -579,6 +579,13 @@ void queue_wait_w_tmo(struct event_queue *q, struct queue_event *ev, int ticks) | |||
579 | int oldlevel; | 579 | int oldlevel; |
580 | unsigned int rd, wr; | 580 | unsigned int rd, wr; |
581 | 581 | ||
582 | /* this function works only with a positive number (or zero) of ticks */ | ||
583 | if (ticks == TIMEOUT_BLOCK) | ||
584 | { | ||
585 | queue_wait(q, ev); | ||
586 | return; | ||
587 | } | ||
588 | |||
582 | #ifdef HAVE_EXTENDED_MESSAGING_AND_NAME | 589 | #ifdef HAVE_EXTENDED_MESSAGING_AND_NAME |
583 | KERNEL_ASSERT(QUEUE_GET_THREAD(q) == NULL || | 590 | KERNEL_ASSERT(QUEUE_GET_THREAD(q) == NULL || |
584 | QUEUE_GET_THREAD(q) == thread_self_entry(), | 591 | QUEUE_GET_THREAD(q) == thread_self_entry(), |