zephyr/kernel/include
Andy Ross 85bc0a3fe6 kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread()
The scheduler exposed two APIs to do the same thing:
_add_thread_to_ready_q() was a low level primitive that in most cases
was wrapped by _ready_thread(), which also (1) checks that the thread
_is_ready() or exits, (2) flags the thread as "started" to handle the
case of a thread running for the first time out of a waitq timeout,
and (3) signals a logger event.

As it turns out, all existing usage was already checking case #1.
Case #2 can be better handled in the timeout resume path instead of on
every call.  And case #3 was probably wrong to have been skipping
anyway (there were paths that could make a thread runnable without
logging).

Now _add_thread_to_ready_q() is an internal scheduler API, as it
probably always should have been.

This also moves some asserts from the inline _ready_thread() wrapper
to the underlying true function for code size reasons, otherwise the
extra use of the inline added by this patch blows past code size
limits on Quark D2000.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-03-18 16:58:12 -04:00
..
gen_offset.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
kernel_internal.h kernel: SMP timer integration 2018-02-16 10:44:29 -05:00
kernel_offsets.h kernel: SMP-aware scheduler 2018-02-16 10:44:29 -05:00
kernel_structs.h kernel: SMP-aware scheduler 2018-02-16 10:44:29 -05:00
ksched.h kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
kswap.h kernel/kswap.h: Hook event logger from switch-based _Swap 2018-02-16 10:44:29 -05:00
offsets_short.h kernel/arch: streamline thread user options 2017-01-24 13:34:50 +00:00
syscall_handler.h kernel: include: rename nano_internal.h to kernel_internal.h 2018-01-31 10:07:21 -06:00
timeout_q.h kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
wait_q.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00