Traditionally threads have been initialized with a PRESTART flag set, which gets cleared when the thread runs for the first time via either its timeout or the k_thread_start() API. But if you think about it, this is no different, semantically, than SUSPENDED: the thread is prevented from running until the flag is cleared. So unify the two. Start threads in the SUSPENDED state, point everyone looking at the PRESTART bit to the SUSPENDED flag, and make k_thread_start() be a synonym for k_thread_resume(). There is some mild code size savings from the eliminated duplication, but the real win here is that we make space in the thread flags byte, which had run out. Signed-off-by: Andy Ross <andyross@google.com> |
||
|---|---|---|
| .. | ||
| gen_offset.h | ||
| ipi.h | ||
| kernel_arch_interface.h | ||
| kernel_internal.h | ||
| kernel_offsets.h | ||
| kernel_tls.h | ||
| ksched.h | ||
| kswap.h | ||
| kthread.h | ||
| mmu.h | ||
| offsets_short.h | ||
| priority_q.h | ||
| timeout_q.h | ||
| wait_q.h | ||