Lines Matching full:fifo
16 * @brief Test fifo APIs timeout
18 * This module tests following fifo timeout scenarios
24 * of queueing/dequeueing when timeout occurs, first on one fifo, then on
27 * Finally, multiple threads pend on one fifo, and they all get the
44 struct k_fifo *fifo; member
112 /* a thread sleeps then puts data on the fifo */
121 /* a thread pends on a fifo then times out */
131 packet = k_fifo_get(d->fifo, K_MSEC(d->timeout)); in test_thread_pend_and_timeout()
165 LOG_DBG(" thread (q order: %d, t/o: %d, fifo %p)", in test_multiple_threads_pending()
166 data->q_order, data->timeout, data->fifo); in test_multiple_threads_pending()
185 " thread (q order: %d, t/o: %d, fifo %p)", in test_multiple_threads_pending()
186 data->q_order, data->timeout, data->fifo); in test_multiple_threads_pending()
199 /* a thread pends on a fifo with a timeout and gets the data in time */
205 packet = k_fifo_get(d->fifo, K_MSEC(d->timeout)); in test_thread_pend_and_get_data()
212 /* Spins child threads that get fifo data in time, except the last one */
232 k_fifo_put(test_data[ii].fifo, get_scratch_packet()); in test_multiple_threads_get_data()
236 TC_ERROR("thread %d got NULL value from fifo\n", ii); in test_multiple_threads_get_data()
247 LOG_DBG(" thread (q order: %d, t/o: %d, fifo %p)", in test_multiple_threads_get_data()
248 data->q_order, data->timeout, data->fifo); in test_multiple_threads_get_data()
254 TC_ERROR("thread %d got NULL value from fifo\n", ii); in test_multiple_threads_get_data()
264 LOG_DBG(" thread (q order: %d, t/o: %d, fifo %p)", in test_multiple_threads_get_data()
265 data->q_order, data->timeout, data->fifo); in test_multiple_threads_get_data()
270 /* try getting data on fifo with special timeout value, return result in fifo */
297 * @brief Test empty fifo with timeout and K_NO_WAIT
307 /* Test empty fifo with timeout */ in ZTEST()
314 /* Test empty fifo with timeout of K_NO_WAIT */ in ZTEST()
320 * @brief Test non empty fifo with timeout and K_NO_WAIT
343 * @brief Test fifo with timeout and K_NO_WAIT
344 * @details In first scenario test fifo with some timeout where child thread
345 * puts data on the fifo on time. In second scenario test k_fifo_get with
346 * timeout of K_NO_WAIT and the fifo should be filled by the child thread
347 * based on the data availability on another fifo. In third scenario test
348 * k_fifo_get with timeout of K_FOREVER and the fifo should be filled by
349 * the child thread based on the data availability on another fifo.
361 * Test fifo with some timeout and child thread that puts in ZTEST()
362 * data on the fifo on time in ZTEST()
378 * Test k_fifo_get with timeout of K_NO_WAIT and the fifo in ZTEST()
380 * the data availability on another fifo. In this test child in ZTEST()
381 * thread does not find data on fifo. in ZTEST()
394 * Test k_fifo_get with timeout of K_NO_WAIT and the fifo in ZTEST()
396 * the data availability on another fifo. In this test child in ZTEST()
397 * thread does find data on fifo. in ZTEST()
414 * Test k_fifo_get with timeout of K_FOREVER and the fifo in ZTEST()
416 * the data availability on another fifo. In this test child in ZTEST()
417 * thread does find data on fifo. in ZTEST()
434 * @brief Test fifo with different timeouts
435 * @details test multiple threads pending on the same fifo with
445 * fifo with different timeouts in ZTEST()
474 * @brief Test same fifo with different timeouts
475 * @details test multiple threads pending on the same fifo with
485 * fifo with different timeouts, but getting in ZTEST()
494 * @brief Test fifo init
507 /* Fill scratch fifo */ in test_timeout_setup()