zephyr/kernel/include
James Harris 2cd0f66515 kernel: sched: change to 3-way thread priority comparison
`z_is_t1_higher_prio_than_t2` was being called twice in both the
context-switch fastpath and in `z_priq_rb_lessthan`, just to
dealing with priority ties. In addition, the API was error-prone
(and too much in the fastpath to be able to assert its invarients)
- see also #32710 for a previous example of this API breaking
and returning a>b but also b>a.

Replacing this with a direct 3-way comparison `z_cmp_t1_prio_with_t2`
sidesteps most of these issues. There is still a concern that
`sgn(z_cmp_t1_prio_with_t2(a,b)) != -sgn(z_cmp_t1_prio_with_t2(b,a))`
but I don't see any way to alleviate this aside from adding an
assert to the fastpath.

Signed-off-by: James Harris <james.harris@intel.com>
2021-03-02 14:27:14 -05:00
..
gen_offset.h aarch64: Use absolute symbols for the callee saved registers 2020-11-17 18:59:23 -05:00
kernel_arch_interface.h include/kernel_arch_interface.h: Redocument arch_switch() 2021-02-14 16:22:45 -05:00
kernel_internal.h kernel: Add new k_thread_abort()/k_thread_join() 2021-02-24 16:39:15 -05:00
kernel_offsets.h device: add post-process of elf file to manage device handles 2021-02-19 15:46:16 -05:00
kernel_tls.h kernel: tls: align tdata/tbss sections in stack 2021-02-07 23:28:43 -05:00
ksched.h kernel: sched: change to 3-way thread priority comparison 2021-03-02 14:27:14 -05:00
kswap.h kernel/sched: Adjust locking in z_swap() 2021-02-24 16:39:15 -05:00
mmu.h kernel: add CONFIG_SRAM_OFFSET 2021-02-22 14:55:28 -05:00
offsets_short.h kernel: add common bits to support TLS 2020-10-24 10:52:00 -07:00