zephyr/kernel
Benjamin Walsh f955476559 kernel/arch: optimize memory use of some thread fields
Some thread fields were 32-bit wide, when they are not even close to
using that full range of values. They are instead changed to 8-bit fields.

- prio can fit in one byte, limiting the priorities range to -128 to 127

- recursive scheduler locking can be limited to 255; a rollover results
  most probably from a logic error

- flags are split into execution flags and thread states; 8 bits is
  enough for each of them currently, with at worst two states and four
  flags to spare (on x86, on other archs, there are six flags to spare)

Doing this saves 8 bytes per stack. It also sets up an incoming
enhancement when checking if the current thread is preemptible on
interrupt exit.

Change-Id: Ieb5321a5b99f99173b0605dd4a193c3bc7ddabf4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-09 20:52:24 +00:00
..
configs kernel: add LEGACY_KERNEL option 2017-01-09 19:42:13 +00:00
include kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
alert.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
atomic_c.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
compiler_stack_protect.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
device.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
errno.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
fifo.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
idle.c kernel: fix all nanokernel usage in comments 2016-12-21 18:45:03 +00:00
init.c kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
int_latency_bench.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
Kconfig kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
Kconfig.event_logger kernel: kconfig: move event logger options into file 2016-12-19 19:58:37 +00:00
Kconfig.power_mgmt kernel: kconfig: move power management options out 2016-12-19 19:58:37 +00:00
legacy_offload.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
legacy_timer.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
lifo.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
mailbox.c kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
Makefile logging: move event_logger to subsys/logging 2016-12-25 14:34:43 -05:00
mem_pool.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
mem_slab.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
msg_q.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
mutex.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
pipes.c kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
sched.c kernel: do not use sys_dlist_insert_at() in _pend_thread() 2017-01-06 17:32:26 +00:00
sem.c kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
stack.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
sys_clock.c kernel: optimize ms-to-ticks for certain tick frequencies 2016-12-21 19:50:07 +00:00
system_work_q.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
thread_abort.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
thread.c kernel/arch: optimize memory use of some thread fields 2017-01-09 20:52:24 +00:00
timer.c tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
version.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00
work_q.c kernel: move kernel code to kernel/ directly 2016-12-19 14:59:35 -05:00