zephyr/kernel
Andrew Boie e0ca403f4c kernel: add assert for mis-used k_thread_create()
k_thread_create() works as expected on both uninitialized memory,
or threads that have completely exited.

However, horrible and difficult to comprehend things can happen if a
thread object is already being used by the kernel and
k_thread_create() is called on it.

Historically this has been a problem with test cases trying to be
parsimonious with thread objects and not properly cleaning up
after themselves. Add an assertion for this which should catch
both the illegal creation of a thread already active, or threads
racing to create the same thread object.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-09-30 14:11:59 -04:00
..
include kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
atomic_c.c
cache_handlers.c
CMakeLists.txt kernel: Deprecate CONFIG_MULTITHREADING 2020-09-23 15:50:32 -05:00
compiler_stack_protect.c
device.c kernel: device: invert sense of ready bit 2020-09-15 18:22:38 +02:00
errno.c
fatal.c
futex.c
idle.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
init.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
Kconfig kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
kheap.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mailbox.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mem_domain.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mem_slab.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mempool_sys.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mempool.c
mmu.c kernel: demote k_mem_map to z_mem_map 2020-09-03 14:24:38 -04:00
msg_q.c doc: Clarify semantics of k_msgq_put 2020-09-23 13:21:07 -05:00
mutex.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
pipes.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
poll.c
queue.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
sched.c kernel: add assert for mis-used k_thread_create() 2020-09-30 14:11:59 -04:00
sem.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
smp.c
stack.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
system_work_q.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
thread_abort.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
thread.c kernel: add assert for mis-used k_thread_create() 2020-09-30 14:11:59 -04:00
timeout.c kernel: avoid implementation-defined behavior in timeout calculation 2020-09-17 22:19:35 -04:00
timer.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
userspace_handler.c
userspace.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
version.c
work_q.c