mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 09:52:25 +00:00
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> |
||
---|---|---|
.. | ||
include | ||
alert.c | ||
atomic_c.c | ||
CMakeLists.txt | ||
compiler_stack_protect.c | ||
device.c | ||
errno.c | ||
idle.c | ||
init.c | ||
int_latency_bench.c | ||
Kconfig | ||
Kconfig.event_logger | ||
Kconfig.power_mgmt | ||
mailbox.c | ||
mem_domain.c | ||
mem_slab.c | ||
mempool.c | ||
msg_q.c | ||
mutex.c | ||
pipes.c | ||
poll.c | ||
queue.c | ||
sched.c | ||
sem.c | ||
smp.c | ||
stack.c | ||
sys_clock.c | ||
system_work_q.c | ||
thread_abort.c | ||
thread.c | ||
timer.c | ||
userspace_handler.c | ||
userspace.c | ||
version.c | ||
work_q.c |