zephyr/arch/arc
Benjamin Walsh 168695c7ef kernel/arch: inspect prio/sched_locked together for preemptibility
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>
2017-01-09 20:52:25 +00:00
..
core kernel/arch: inspect prio/sched_locked together for preemptibility 2017-01-09 20:52:25 +00:00
include kernel: remove unused and obsolete headers 2016-12-19 19:58:03 +00:00
soc Makefile (arc/soc/quark_se): New compiler options 2017-01-05 11:26:21 -08:00
Kbuild new SoC naming convention 2016-04-18 21:24:59 +00:00
Kconfig kernel: rename NANOKERNEL_TICKLESS_IDLE_SUPPORTED 2016-12-19 19:58:35 +00:00
Makefile arc: add -fno-delete-null-pointer-checks 2017-01-04 19:06:41 +00:00
defconfig arc: Remove nonexistant Kconfig sybmol from defconfig 2016-07-27 17:14:54 +00:00