diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-17 22:28:09 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-17 22:28:09 +0100 |
commit | cd5e3c971c73f8b6111486c273be3634e3867e81 (patch) | |
tree | 1fea9bf5e939cb1f5994f6a2a60a2d968c5efcdb | |
parent | 2d0222cea22879e7a14381e395bce7c49a7ba605 (diff) | |
parent | c8812e110b3fb23a675957d97d2afa057169c866 (diff) |
Merge branch 'qemu_netduino2' into olimex-stm32-h407
-rw-r--r-- | src/thread.c | 10 | ||||
-rw-r--r-- | src/uart.c | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/thread.c b/src/thread.c index bb5ddc4..55efbe2 100644 --- a/src/thread.c +++ b/src/thread.c @@ -410,17 +410,15 @@ static void thread_runq_tick(struct thread_runq *runq) { struct thread_list *list; + unsigned int priority; assert(!cpu_intr_enabled()); assert(!thread_preempt_enabled()); - if (runq->current == runq->idle) { - return; - } - - list = thread_runq_get_list(runq, runq->current->priority); + priority = runq->current->priority; + list = thread_runq_get_list(runq, priority); - if (thread_list_singular(list)) { + if (thread_list_singular(list) && (priority != THREAD_IDLE_PRIORITY)) { return; } @@ -169,7 +169,8 @@ uart_write(uint8_t byte) int uart_read(uint8_t *byte) { - int primask, error; + uint32_t primask; + int error; primask = thread_preempt_disable_intr_save(); |