zephyr/kernel
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
..
include kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
posix kernel: pthread: correcting pthread_setschedparam. 2018-03-07 08:23:09 -05:00
alert.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
atomic_c.c
CMakeLists.txt kernel: POSIX: Compatibility layer for pthread APIs. 2018-02-21 19:17:28 -05:00
compiler_stack_protect.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
device.c kernel: device: Only compare strings if pointer comparison fails 2018-02-15 17:31:59 -08:00
errno.c
idle.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
init.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
int_latency_bench.c
Kconfig kernel: introduce initial stack randomization 2018-03-16 16:25:22 -07:00
Kconfig.event_logger kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
Kconfig.power_mgmt kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
mailbox.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
mem_domain.c kernel: mem_domain: Fix compile issues 2018-03-05 10:47:00 -06:00
mem_slab.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
mempool.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
msg_q.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
mutex.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
pipes.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
poll.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
queue.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
sched.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
sem.c kernel: Remove unnecessary old code 2018-03-05 14:10:50 -08:00
smp.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
stack.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
sys_clock.c kernel: SMP timer integration 2018-02-16 10:44:29 -05:00
system_work_q.c kernel: introduce stack definition macros 2017-06-09 18:53:28 -04:00
thread_abort.c kernel: Allow k_thread_abort(_current) from ISRs 2018-02-16 10:44:29 -05:00
thread.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
timer.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
userspace_handler.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
userspace.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
version.c kernel: version: no need to store version in RAM 2017-09-07 16:34:50 -07:00
work_q.c work_q: Correctly clear pending flag in delayed work queue, update docs 2018-02-13 18:08:57 -05:00