zephyr/kernel
Andy Ross 55a7e46b66 kernel/poll: Remove POLLING thread state bit
The _THREAD_POLLING bit in thread_state was never actually a
legitimate thread "state".  It is a clever synchronization trick
introduced to allow the thread to release the irq_lock while looping
over the input event array without dropping events.

Instead, make that flag a word in the "poller" struct that lives on
the stack of the thread calling k_poll.  The disadvantage is the 4
bytes of thread space needed.  Advantages:

+ Cleaner API, it's now internal to poll instead of being globally
  visible.

+ The thread_state bit space is just one byte, and was almost full
  already.

+ Smaller code to write/test a full word and not a bitfield

+ Words are atomic, so no need for one of irq lock/unlock pairs.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-06-11 17:25:38 -04:00
..
include kernel/poll: Remove POLLING thread state bit 2018-06-11 17:25:38 -04:00
alert.c
atomic_c.c
CMakeLists.txt
compiler_stack_protect.c
device.c
errno.c
idle.c
init.c kernel: Use IS-specific entropy function when available 2018-05-24 15:13:13 -07:00
int_latency_bench.c
Kconfig kernel: work_q: Document implications of default sys work_q priority 2018-06-11 14:40:07 -04:00
Kconfig.event_logger
Kconfig.power_mgmt
mailbox.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
mem_domain.c
mem_slab.c kernel: mem_slab: Reschedule in k_mem_slab_free only when necessary. 2018-05-18 20:16:50 +03:00
mempool.c kernel/mempool: Handle transient failure condition 2018-05-27 09:55:04 -04:00
msg_q.c kernel: Wait queues aren't dlists anymore 2018-05-19 07:00:55 +03:00
mutex.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
pipes.c kernel: Wait queues aren't dlists anymore 2018-05-19 07:00:55 +03:00
poll.c kernel/poll: Remove POLLING thread state bit 2018-06-11 17:25:38 -04:00
queue.c kernel/queue: Fix spurious NULL exit condition when using timeouts 2018-06-11 17:11:51 -04:00
sched.c kernel: sched: use _is_thread_ready() in should_preempt() 2018-06-04 08:21:47 -04:00
sem.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
smp.c
stack.c kernel: Wait queues aren't dlists anymore 2018-05-19 07:00:55 +03:00
sys_clock.c
system_work_q.c
thread_abort.c
thread.c kernel: move thread monitor init to common code 2018-06-06 14:26:45 -04:00
timer.c kernel: Fix sloppy wait queue API 2018-05-18 01:48:48 +03:00
userspace_handler.c
userspace.c
version.c
work_q.c