zephyr/arch/arm/core
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
..
cortex_m arm: Cortex-M0: Adapt core register code to M0 2017-01-03 22:44:35 +00:00
offsets kernel: remove nano/micro wording and usage 2016-12-19 19:58:03 +00:00
Kconfig arm: systick: Some SoCs do not have systick 2016-11-27 19:39:26 +00:00
Makefile kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
__aeabi_atexit.c build: Add C++ support 2016-02-05 20:25:23 -05:00
cpu_idle.S kernel: remove nano/micro wording and usage 2016-12-19 19:58:03 +00:00
exc_exit.S kernel/arch: inspect prio/sched_locked together for preemptibility 2017-01-09 20:52:25 +00:00
fatal.c kernel: replace all remaining nanokernel occurances 2016-12-25 14:34:43 -05:00
fault.c arm: Cortex-M0: Adapt core register code to M0 2017-01-03 22:44:35 +00:00
fault_s.S arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
irq_init.c kernel: replace all remaining nanokernel occurances 2016-12-25 14:34:43 -05:00
irq_manage.c kernel: replace all remaining nanokernel occurances 2016-12-25 14:34:43 -05:00
irq_offload.c kernel: replace all remaining nanokernel occurances 2016-12-25 14:34:43 -05:00
isr_wrapper.S arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
swap.S arch: remove instances of fiberRtnValueSet() 2016-12-21 19:50:08 +00:00
sys_fatal_error_handler.c arch/all: simpler _SysFatalErrorHandler() 2016-12-15 16:17:39 -05:00
thread.c kernel: replace all remaining nanokernel occurances 2016-12-25 14:34:43 -05:00
thread_abort.c kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00