zephyr/kernel
Andy Ross dadc6643e4 kernel/poll: Move "_poller" into thread struct, fix COHERENCE collision
Fix the issue where the kernel poll code would place the tracking
struct on the caller stack and share it with other threads, thus
creating a cache coherence issue on systems where KERNEL_COHERENCE is
enabled.

This works by eliminating the thread backpointer in struct _poller and
simply placing the (now just two-byte!) struct directly into the
thread struct.

Note that this doesn't attempt to fix the API paradigm that the
natural way to structure a call to k_poll() is to use an array of
k_poll_events on the CALLER's stack.  So it's likely that most
"typical" k_poll code is still going to have problems with
KERNEL_COHERENCE.  But at least now the kernel internals aren't
fundamentally broken.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-11-11 10:59:52 -05:00
..
include kernel: add common bits to support TLS 2020-10-24 10:52:00 -07:00
atomic_c.c
cache_handlers.c
CMakeLists.txt kernel: Deprecate CONFIG_MULTITHREADING 2020-09-23 15:50:32 -05:00
compiler_stack_protect.c
device.c kernel: device: invert sense of ready bit 2020-09-15 18:22:38 +02:00
errno.c kernel: support using thread local storage for errno 2020-10-24 10:52:00 -07:00
fatal.c kernel: fatal: check if _current is NULL 2020-10-24 12:54:32 -04:00
futex.c
idle.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
init.c kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
Kconfig kernel: limit thread local storage to Zephyr SDK 2020-10-30 15:59:06 +01:00
kheap.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mailbox.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mem_domain.c userspace: do nothing if added to same domain 2020-10-22 16:47:07 -07:00
mem_slab.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mempool_sys.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
mempool.c
mmu.c kernel: support non-identity RAM mapping 2020-11-09 20:19:13 -05:00
msg_q.c doc: Clarify semantics of k_msgq_put 2020-09-23 13:21:07 -05:00
mutex.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
pipes.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
poll.c kernel/poll: Move "_poller" into thread struct, fix COHERENCE collision 2020-11-11 10:59:52 -05:00
queue.c kernel/queue: fix queue append/get race 2020-10-28 17:01:41 +01:00
sched.c kernel: add context pointer to thread->fn_abort 2020-10-22 23:32:37 -04:00
sem.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
smp.c
stack.c kernel: stack: fix stack_push spinlock and return 2020-10-07 17:10:36 -04:00
system_work_q.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
thread_abort.c kernel: handle thread self-aborts on idle thread 2020-09-30 14:11:59 -04:00
thread.c kernel: wipe TLS when dropping to user mode 2020-10-26 13:06:16 +01:00
timeout.c sys: util: Replace MIN(MAX(a, b), c) with CLAMP 2020-11-05 12:12:17 +01:00
timer.c kernel: timer: update k_timer API for const correctness 2020-10-02 11:29:14 +02:00
userspace_handler.c
userspace.c kernel: return error instead of misaligned k_thread object 2020-11-04 14:03:43 -08:00
version.c
work_q.c kernel: delayed_work: update k_delayed_work_cancel documentation 2020-10-09 11:48:00 +02:00