zephyr/kernel
Benjamin Walsh 2e0bf3a0f8 kernel/sem: fix issue with expired timeouts on group operations
The loop was not tracking the correct next node in the list correctly.

However, it happened that the fix is way more involved than just fixing
that small issue, due to the way that semaphore group timeouts work.

Instead of handling timeouts one-by-one, we have to handle all timeouts
in a semaphore group as one. To do that, we use the fact that the
timeout of the real thread is always found first in the kernel's
timeout_q, and if it has expired, we do not even look at the timeouts of
the dummy threads.

Change-Id: Iadcfd06f33c6b335efa2592b2c01eeb5ca67afde
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-16 04:56:26 +00:00
..
configs
include kernel/timeouts: add description of timeouts queued on the same tick 2017-02-16 04:56:25 +00:00
alert.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
atomic_c.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
compiler_stack_protect.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
device.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
errno.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
fifo.c kernel/poll: add missing poll_event runtime init 2017-02-03 13:54:00 +00:00
idle.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
init.c kernel: init: use C implementation for STACK_CANARY_INIT 2017-02-07 22:18:21 +00:00
int_latency_bench.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Kconfig Xtensa port: Increased idle thread stack size to avoid stack overflow. 2017-02-13 08:04:27 -08:00
Kconfig.event_logger license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Kconfig.power_mgmt kernel: Remove redundant TICKLESS_IDLE_SUPPORTED option 2017-02-08 13:02:34 +00:00
legacy_offload.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
legacy_timer.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
lifo.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
mailbox.c kernel: rename thread states symbols 2017-01-24 13:34:49 +00:00
Makefile kernel: add k_poll() API 2017-02-02 00:30:00 +00:00
mem_pool.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
mem_slab.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
msg_q.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
mutex.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
pipes.c kernel: rename thread states symbols 2017-01-24 13:34:49 +00:00
poll.c kernel/poll: fix signal.signaled not being set when k_poll() waits 2017-02-09 23:54:27 +00:00
sched.c kernel/sched: protect thread sched_lock with compiler barriers 2017-02-16 04:56:21 +00:00
sem.c kernel/sem: fix issue with expired timeouts on group operations 2017-02-16 04:56:26 +00:00
stack.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
sys_clock.c kernel/timeout: fix handling expired timeouts in reverve queuing order 2017-02-16 04:56:25 +00:00
system_work_q.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
thread_abort.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
thread.c kernel: thread: Fix legacy symbol mixup in fp path 2017-02-03 03:20:31 +00:00
timer.c kernel: k_timer_stop: remove assert when called from an ISR 2017-02-04 19:25:11 +00:00
version.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
work_q.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00