zephyr/include
Paul Sokolovsky 3f50707672 kernel: queue, fifo: Add cancel_wait operation.
Currently, a queue/fifo getter chooses how long to wait for an
element. But there are scenarios when putter would know better,
there should be a way to expire getter's timeout to make it run
again. k_queue_cancel_wait() and k_fifo_cancel_wait() functions
do just that. They cause corresponding *_get() functions to return
with NULL value, as if timeout expired on getter's side (even
K_FOREVER).

This can be used to signal out of band conditions from putter to
getter, e.g. end of processing, error, configuration change, etc.
A specific event would be communicated to getter by other means
(e.g. using existing shared context structures).

Without this call, achieving the same effect would require e.g.
calling k_fifo_put() with a pointer to a special sentinal memory
structure - such structure would need to be allocated somewhere
and somehow, and getter would need to recognize it from a normal
data item. Having cancel_wait() functions offers an elegant
alternative. From this perspective, these calls can be seen as
an equivalent to e.g. k_fifo_put(fifo, NULL), except that such
call won't work in practice.

Change-Id: I47b7f690dc325a80943082bcf5345c41649e7024
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-05-10 09:40:33 -04:00
..
arch doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
bluetooth Bluetooth: Fix HCI LE Set PHY cmd parameters 2017-05-10 07:30:16 +03:00
crypto crypto: Remove useless attribute 2017-04-27 13:06:31 +00:00
debug kconfig: fixed Kconfig name in comments 2017-04-10 16:07:09 +00:00
display doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
drivers doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
fs license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
linker Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
logging doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
misc doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
net net: Cleanup use of C99 types 2017-05-09 17:06:28 -04:00
shell license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
toolchain toolchain: don't define __stack outside C code 2017-04-20 16:01:17 +00:00
usb doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
zephyr Introduce new sized integer typedefs 2017-04-20 16:07:08 +00:00
adc.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
aio_comparator.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05: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 Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
console.h subsys: console: Add missing zephyr/types.h include 2017-04-26 22:56:01 +00:00
counter.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
crc16.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
device.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
disk_access.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
dma.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
eth.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
flash.h Introduce new sized integer typedefs 2017-04-20 16:07:08 +00:00
fs.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
gpio.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
i2c.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
init.h kernel: remove deprecated init levels 2017-04-07 17:45:34 +00:00
ipm.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
irq_offload.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
irq.h spell: fix comment typos: /include 2017-04-19 00:41:25 +00:00
kernel_version.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
kernel.h kernel: queue, fifo: Add cancel_wait operation. 2017-05-10 09:40:33 -04:00
linker-defs.h Introduce new sized integer typedefs 2017-04-20 16:07:08 +00:00
linker-tool-gcc.h spell: fix comment typos: /include 2017-04-19 00:41:25 +00:00
linker-tool.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
pinmux.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
power.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
pwm.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
random.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
rtc.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
section_tags.h arm: linker: remove unused linker sections 2017-04-28 15:26:39 -05:00
sections.h arm: linker: remove unused linker sections 2017-04-28 15:26:39 -05:00
sensor.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
shared_irq.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
spi.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
sw_isr_table.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
sys_clock.h kernel: tickless: Add tickless kernel support 2017-04-27 13:46:28 +00:00
sys_io.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
toolchain.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
uart.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
watchdog.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
zephyr.h kernel: remove legacy.h and MDEF support 2017-04-19 10:59:35 -05:00