zephyr/kernel
Paul Sokolovsky 45c0b20470 kernel: k_poll: Introduce separate status for cancelled events
Previously (as introduced in 48fadfe62), if k_poll() waited on a
queue (or subclass like fifo), and wait was cancelled on queue's
side using k_queue_cancel_wait(), k_poll returned -EINTR. But it
did not set event->state field (to anything else but
K_POLL_STATE_NOT_READY), so in case of waiting on multiple queues,
it was not possible to differentiate which of them was cancelled.

This in particular broke detection of network socket EOF conditions
in POSIX poll() implementation.

This situation is now resolved with introduction of explicit
K_POLL_STATE_CANCELLED state, which is now set for cancelled queue
(-EINTR return remains the same).

This change also elaborates docstring for the functions mentioned, to
document this behavior.

Fixes: #9032

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-08-30 09:28:29 -04:00
..
include sched: Properly account for timeslicing in tickless mode 2018-08-29 10:01:41 -04:00
alert.c
atomic_c.c
CMakeLists.txt
compiler_stack_protect.c
device.c
errno.c kernel: userspace: reserve stack space to store local data 2018-08-17 09:40:52 -07:00
idle.c
init.c kernel: Enable interrupts for MULTITHREADING=n on supported arch's 2018-08-27 16:15:10 -04:00
int_latency_bench.c
Kconfig kernel: event_logger: remove kernel_event_logger 2018-08-21 05:45:47 -07:00
Kconfig.power_mgmt doc: fix kconfig misspellings 2018-08-28 13:58:46 -04:00
mailbox.c kernel: Explicitly ignoring memcpy return 2018-08-16 19:47:41 -07:00
mem_domain.c
mem_slab.c
mempool.c kernel: Explicitly ignoring memcpy return 2018-08-16 19:47:41 -07:00
msg_q.c kernel: Explicitly ignoring memcpy return 2018-08-16 19:47:41 -07:00
mutex.c tracing: support generic tracing hooks 2018-08-21 05:45:47 -07:00
pipes.c kernel: pipes: fix k_pipe_block_put() when not enough space 2018-08-29 15:57:28 -04:00
poll.c kernel: k_poll: Introduce separate status for cancelled events 2018-08-30 09:28:29 -04:00
queue.c kernel: k_poll: Introduce separate status for cancelled events 2018-08-30 09:28:29 -04:00
sched.c sched: Properly account for timeslicing in tickless mode 2018-08-29 10:01:41 -04:00
sem.c tracing: support generic tracing hooks 2018-08-21 05:45:47 -07:00
smp.c
stack.c
sys_clock.c kernel: Remove unused variable 2018-08-26 19:39:52 -07:00
system_work_q.c
thread_abort.c
thread.c kernel: event_logger: remove kernel_event_logger 2018-08-21 05:45:47 -07:00
timer.c
userspace_handler.c
userspace.c kernel: Explicitly ignoring memcpy return 2018-08-16 19:47:41 -07:00
version.c
work_q.c