mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-03 02:01:56 +00:00
These two fields in the thread structure control the preemptibility of a thread. sched_locked is decremented when the scheduler gets locked, which means that the scheduler is locked for values 0xff to 0x01, since it can be locked recursively. A thread is coop if its priority is negative, thus if the prio field value is 0x80 to 0xff when looked at as an unsigned value. By putting them end-to-end, this means that a thread is non-preemptible if the bundled value is greater than or equal to 0x0080. This is the only thing the interrupt exit code has to check to decide to try a reschedule or not. Change-Id: I902d36c14859d0d7a951a6aa1bea164613821aca Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com> |
||
---|---|---|
.. | ||
configs | ||
include | ||
alert.c | ||
atomic_c.c | ||
compiler_stack_protect.c | ||
device.c | ||
errno.c | ||
fifo.c | ||
idle.c | ||
init.c | ||
int_latency_bench.c | ||
Kconfig | ||
Kconfig.event_logger | ||
Kconfig.power_mgmt | ||
legacy_offload.c | ||
legacy_timer.c | ||
lifo.c | ||
mailbox.c | ||
Makefile | ||
mem_pool.c | ||
mem_slab.c | ||
msg_q.c | ||
mutex.c | ||
pipes.c | ||
sched.c | ||
sem.c | ||
stack.c | ||
sys_clock.c | ||
system_work_q.c | ||
thread_abort.c | ||
thread.c | ||
timer.c | ||
version.c | ||
work_q.c |