zephyr/tests/kernel
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
..
alert/test_alert_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
arm_irq_vector_table tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
arm_runtime_nmi tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
bitfield tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
common tests:kernel: added tests for printk left justifier 2017-05-08 09:43:37 -04:00
context tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
critical tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
errno tests: added TC_START to tests 2017-04-13 12:08:14 +00:00
fatal kernel tests: fatal: added "ignore_faults" tag 2017-05-03 08:16:38 -04:00
fifo/test_fifo_api kernel: queue, fifo: Add cancel_wait operation. 2017-05-10 09:40:33 -04:00
fp_sharing tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
gen_isr_table tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
ipm tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
irq_offload tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
libs tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
lifo/test_lifo_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
mbox/mbox_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
mem_heap/mheap_api_concept tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
mem_pool tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
mem_safe tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
mem_slab tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
msgq/msgq_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
multilib tests: added TC_START to tests 2017-04-13 12:08:14 +00:00
mutex tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
obj_tracing kernel: remove all remaining references to nanokernel 2017-04-10 20:21:10 +00:00
pending tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
pipe/test_pipe_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
poll tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
profiling/profiling_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
queue tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
semaphore/sema_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
sprintf tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
stack/stack_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
stackprot kernel: remove remaining microkernel references 2017-04-10 20:21:05 +00:00
static_idt x86: exception-assisted panic/oops support 2017-04-22 10:31:49 -04:00
systhreads tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
test_build tests: newlib: disable bluetooth for now 2017-01-24 14:33:43 +00:00
test_sleep tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
test_tickless arch: sam3x: update Kconfig options after move to SAM SoC family tree 2017-05-03 13:51:37 -04:00
threads_customdata/cdata_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
threads_lifecycle tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
threads_scheduling/schedule_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
tickless/tickless_concept tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
timer samples: tickless: Enables tickless kernel option in some apps 2017-04-27 13:46:33 +00:00
workq tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
xip boards: Add support for the CC3220SF_LAUNCHXL board 2017-04-28 15:06:41 -05:00