zephyr/kernel
Andy Ross 50d0942f5e kernel/thread: Cancel timeouts on k_thread_suspend(), make schedule point
When suspending a thread, cancel any pending timeouts which might wake
it up unexpectedly.  Also, make suspending the current thread
(specifically) a schedule point, as callers are clearly going to
expect that to be synchronous.

Also fix a documentation weirdness.  The phrasing in the earlier docs
for k_thread_suspend() was confusing: it could be interpreted as
either document the current (essentially buggy) behavior that threads
will "wake up" due to preexisting timeouts, OR to mean that thread
timeouts will continue to be tracked so that resuming a thread that
was sleeping will continue to sleep until the timeout (something that
has never been implemented: k_sleep() is implemented on top of
suspend).  Rewrite to document what we actually implement.

Fixes #20033

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-25 19:12:05 -05:00
..
include kernel: thread: Fix randomness problem with stack pointer random 2019-11-15 13:43:32 -08:00
atomic_c.c kernel: fix the bug in atomic_c.c 2019-09-26 21:13:20 -04:00
CMakeLists.txt headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
compiler_stack_protect.c kernel: Fix gcc-9.2 warning with _StackCheckHandler 2019-10-04 05:22:30 -07:00
device.c [Code coverage]: Fix the issue of function code coverage in device.c. 2019-09-17 12:35:30 +08:00
errno.c headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
fatal.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
futex.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
idle.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
init.c kernel: thread: Fix randomness problem with stack pointer random 2019-11-15 13:43:32 -08:00
Kconfig kernel: Kconfig: Define dependencies for STACK_CANARIES 2019-11-15 10:13:15 -06:00
Kconfig.power_mgmt kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
mailbox.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
mem_domain.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
mem_slab.c kernel: rename thread return value functions 2019-09-30 15:25:55 -04:00
mempool.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
msg_q.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
mutex.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
pipes.c headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
poll.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
queue.c kernel: rename thread return value functions 2019-09-30 15:25:55 -04:00
sched.c kernel/sched: Fix edge case in MetaIRQ preemption of cooperative threads 2019-11-15 13:09:02 +01:00
sem.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
smp.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
stack.c kernel: rename thread return value functions 2019-09-30 15:25:55 -04:00
system_work_q.c
thread_abort.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
thread.c kernel/thread: Cancel timeouts on k_thread_suspend(), make schedule point 2019-11-25 19:12:05 -05:00
timeout.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
userspace_handler.c kernel: remove vestigal printk references 2019-10-01 16:15:06 -05:00
userspace.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
version.c
work_q.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00