Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
Go to file
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
.known-issues doc: move documetnation context to root directory 2017-01-06 22:51:31 +00:00
arch kernel/arch: inspect prio/sched_locked together for preemptibility 2017-01-09 20:52:25 +00:00
boards subsys: disk: Refactor disk_access stuff into a directory 2017-01-08 20:58:05 +00:00
doc doc: fix documentation target and instructions 2017-01-09 16:20:21 +00:00
drivers kernel: remove dependency on CONFIG_NANO_TIMERS/TIMEOUTS 2017-01-08 18:09:52 +00:00
ext ext: lib: mbedtls : Upgrading mbedTLS library 2017-01-05 17:58:06 +00:00
include kernel: remove dependency on CONFIG_NANO_TIMERS/TIMEOUTS 2017-01-08 18:09:52 +00:00
kernel kernel/arch: inspect prio/sched_locked together for preemptibility 2017-01-09 20:52:25 +00:00
lib net: Restructure network protocols 2017-01-02 10:03:19 +01:00
misc kernel: replace all remaining nanokernel occurances 2016-12-25 14:34:43 -05:00
samples kernel: add LEGACY_KERNEL option 2017-01-09 19:42:13 +00:00
scripts sanitycheck: reduce number of unnecessary configuration builds 2017-01-05 02:05:58 +00:00
subsys filesystem: add mkdir shell command 2017-01-09 19:47:49 +00:00
tests kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
.checkpatch.conf checkpatch: ignore CONST_STRUCT warnings 2016-11-11 22:12:22 +00:00
.gitattributes
.gitignore testcases: instruct git to ignore *log and outdir-* 2016-06-14 22:01:34 +00:00
.gitreview
.mailmap mailmap: added axy (for Anas Nashif) 2016-12-21 13:49:59 +00:00
Kbuild kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
Kconfig kconfig: Do not put architecture in the title 2016-03-14 16:50:51 -04:00
Kconfig.zephyr usb: move usb subsystem to subsys/usb and cleanup header inclusion 2016-10-31 19:21:42 +00:00
LICENSE
MAINTAINERS MAINTAINERS: add tests/kernel to kernel section 2017-01-06 00:00:51 +00:00
Makefile kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
Makefile.inc tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
Makefile.test tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
defaults.tc testcases: catch more fatal kernel error messages 2016-11-11 13:21:16 +00:00
index.rst doc: move documetnation context to root directory 2017-01-06 22:51:31 +00:00
zephyr-env.sh zephyr-env: don't fail unnecesarily when 'set -e' 2017-01-07 02:40:04 +00:00