zephyr/include
Benjamin Walsh acc68c1e59 kernel: add k_poll() API
k_poll() is similar to the POSIX poll() API in spirit in that it allows
a single thread to monitor multiple events without actively polling
them, but rather pending for one or more to become ready. Such events
can be a direct event, or kernel objects (currently only semaphores and
fifos).

When a kernel object being polled on is ready, it is not "given" to the
poller: the poller must then acquire it via the regular API for the
object (e.g. k_sem_take()). Only one thread can poll on a particular
object at one time. These restrictions mean that k_poll() is most
effective when a single thread monitors multiple events that are not
subject for contention. For example, being the sole reader on multiple
fifos, or the only thread being signalled by multiple semaphores, or a
combination of both.

Change-Id: I7035a9baf4aa016fb87afc5f5c0f5f8cb216480f
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-02 00:30:00 +00:00
..
arch arm: scb: Move SCB asm defines into cpu_idle.S 2017-01-30 11:02:39 -06:00
bluetooth Bluetooth: A2DP: Stream End Point Structure 2017-01-28 08:43:41 +02:00
debug license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
display license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
drivers drivers/console/telnet: Provide minimal input handling. 2017-01-27 12:35:53 +02:00
fs license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
linker build: remove obsolete sections from linker scripts 2017-01-18 18:47:17 +00:00
logging kernel_event_logger: add additional function prototypes 2017-01-19 20:17:29 +00:00
misc license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
net net/ieee802154: Modify radio TX function signature 2017-01-27 12:35:53 +02:00
shell license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
toolchain license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
usb usb: Change transfer_len type to int32_t in usb_request_handler typedef 2017-01-30 12:01:49 +00:00
adc.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
aio_comparator.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
atomic.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
cache.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
clock_control.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
counter.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
device.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
disk_access.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
dma.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
eth.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
flash.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
fs.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
gpio.h gpio: Merge the OPEN_DRAIN interface with the DRIVE_STRENGTH interface. 2017-01-25 08:47:22 +00:00
i2c.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
init.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
ipm.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
irq_offload.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
irq.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
kernel_version.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
kernel.h kernel: add k_poll() API 2017-02-02 00:30:00 +00:00
legacy.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
linker-defs.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
linker-tool-gcc.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
linker-tool.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
microkernel.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
nanokernel.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
pinmux.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
power.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
pwm.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
random.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
rtc.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
section_tags.h k64: Rename security_frdm_k64f section 2017-01-30 11:02:35 -06:00
sections.h k64: Rename security_frdm_k64f section 2017-01-30 11:02:35 -06:00
sensor.h sensor: add SENSOR_CHAN_*_XYZ enum values 2017-01-27 17:46:18 +00:00
shared_irq.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
spi.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
sw_isr_table.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
sys_clock.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
sys_io.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
toolchain.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
uart.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
watchdog.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
zephyr.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00