Lines Matching +full:data +full:- +full:timeout
4 * SPDX-License-Identifier: Apache-2.0
38 int32_t timeout; member
68 #define LIFO_THREAD_PRIO -5
98 /* data pushed at last should be read first */ in thread_entry_nowait()
108 static bool is_timeout_in_range(uint32_t start_time, uint32_t timeout) in is_timeout_in_range() argument
113 diff = k_cyc_to_ms_floor32(stop_time - start_time); in is_timeout_in_range()
114 return timeout <= diff; in is_timeout_in_range()
130 struct timeout_order_data *data = in test_multiple_threads_pending() local
133 if (data->timeout_order == ii) { in test_multiple_threads_pending()
135 data->q_order, (int) data->timeout, in test_multiple_threads_pending()
136 data->klifo); in test_multiple_threads_pending()
138 zassert_equal(data->timeout_order, ii, " *** thread %d " in test_multiple_threads_pending()
140 data->timeout_order, ii); in test_multiple_threads_pending()
170 * @brief try getting data on lifo with special timeout value,
180 reply_packet->reply = in test_thread_timeout_reply_values()
193 reply_packet->reply = in test_thread_timeout_reply_values_wfe()
200 * @brief A thread sleeps then puts data on the lifo
206 uint32_t timeout = *((uint32_t *)p2); in test_thread_put_timeout() local
208 k_msleep(timeout); in test_thread_put_timeout()
222 /* put some data on lifo */ in ZTEST()
272 uint32_t start_time, timeout; in ZTEST() local
274 timeout = 100U; in ZTEST()
278 packet = k_lifo_get(&lifo_timeout[0], K_MSEC(timeout)); in ZTEST()
282 zassert_true(is_timeout_in_range(start_time, timeout)); in ZTEST()
284 /* Test empty lifo with timeout of K_NO_WAIT */ in ZTEST()
290 * @brief Test read and write operation in LIFO with timeout
312 * @brief Test LIFO with timeout
319 uint32_t start_time, timeout; in ZTEST() local
322 * Test lifo with some timeout and child thread that puts in ZTEST()
323 * data on the lifo on time in ZTEST()
325 timeout = 10U; in ZTEST()
330 &timeout, NULL, in ZTEST()
333 packet = k_lifo_get(&lifo_timeout[0], K_MSEC(timeout + 10)); in ZTEST()
335 zassert_true(is_timeout_in_range(start_time, timeout)); in ZTEST()
339 * Test k_lifo_get with timeout of K_NO_WAIT and the lifo in ZTEST()
341 * the data availability on another lifo. In this test child in ZTEST()
342 * thread does not find data on lifo. in ZTEST()
355 * Test k_lifo_get with timeout of K_NO_WAIT and the lifo in ZTEST()
357 * the data availability on another lifo. In this test child in ZTEST()
358 * thread does find data on lifo. in ZTEST()
375 * Test k_lifo_get with timeout of K_FOREVER and the lifo in ZTEST()
377 * the data availability on another lifo. In this test child in ZTEST()
378 * thread does find data on lifo. in ZTEST()
405 packet = k_lifo_get(d->klifo, K_MSEC(d->timeout)); in test_thread_pend_and_timeout()
407 zassert_true(is_timeout_in_range(start_time, d->timeout)); in test_thread_pend_and_timeout()
458 lifo_data[i].data = i + 1; in test_para_init()