Lines Matching refs:events
81 struct k_poll_event events[] = { in ZTEST_USER() local
107 zassert_equal(k_poll(events, INT_MAX, K_NO_WAIT), -EINVAL); in ZTEST_USER()
108 zassert_equal(k_poll(events, 4096, K_NO_WAIT), -ENOMEM); in ZTEST_USER()
111 zassert_equal(k_poll(events, 0, K_NO_WAIT), -EAGAIN); in ZTEST_USER()
140 zassert_equal(k_poll(events, ARRAY_SIZE(events), K_NO_WAIT), 0, ""); in ZTEST_USER()
142 zassert_equal(events[0].state, K_POLL_STATE_SEM_AVAILABLE, ""); in ZTEST_USER()
145 zassert_equal(events[1].state, K_POLL_STATE_FIFO_DATA_AVAILABLE, ""); in ZTEST_USER()
151 zassert_equal(events[2].state, K_POLL_STATE_SIGNALED, ""); in ZTEST_USER()
156 zassert_equal(events[3].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
158 zassert_equal(events[4].state, K_POLL_STATE_MSGQ_DATA_AVAILABLE, ""); in ZTEST_USER()
163 events[0].state = K_POLL_STATE_NOT_READY; in ZTEST_USER()
164 events[1].state = K_POLL_STATE_NOT_READY; in ZTEST_USER()
165 events[2].state = K_POLL_STATE_NOT_READY; in ZTEST_USER()
166 events[3].state = K_POLL_STATE_NOT_READY; in ZTEST_USER()
167 events[4].state = K_POLL_STATE_NOT_READY; in ZTEST_USER()
170 zassert_equal(k_poll(events, ARRAY_SIZE(events), K_NO_WAIT), -EAGAIN, in ZTEST_USER()
172 zassert_equal(events[0].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
173 zassert_equal(events[1].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
174 zassert_equal(events[2].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
175 zassert_equal(events[3].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
176 zassert_equal(events[4].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
245 void check_results(struct k_poll_event *events, uint32_t event_type, in check_results() argument
255 zassert_equal(events->state, K_POLL_STATE_SEM_AVAILABLE, in check_results()
258 zassert_equal(events->tag, TAG_0, ""); in check_results()
260 events->state = K_POLL_STATE_NOT_READY; in check_results()
262 zassert_equal(events->state, K_POLL_STATE_NOT_READY, in check_results()
266 zassert_equal(events->tag, TAG_0, ""); in check_results()
271 zassert_equal(events->state, in check_results()
277 zassert_equal(events->tag, TAG_1, ""); in check_results()
279 events->state = K_POLL_STATE_NOT_READY; in check_results()
281 zassert_equal(events->state, K_POLL_STATE_NOT_READY, in check_results()
293 events->state = K_POLL_STATE_NOT_READY; in check_results()
296 zassert_equal(events->state, K_POLL_STATE_NOT_READY, in check_results()
305 zassert_equal(events->state, in check_results()
312 zassert_equal(events->tag, TAG_3, ""); in check_results()
314 events->state = K_POLL_STATE_NOT_READY; in check_results()
316 zassert_equal(events->state, K_POLL_STATE_NOT_READY, in check_results()
660 struct k_poll_event events[] = { in ZTEST() local
687 rc = k_poll(events, ARRAY_SIZE(events), K_SECONDS(1)); in ZTEST()
690 zassert_equal(events[0].state, K_POLL_STATE_NOT_READY, ""); in ZTEST()
691 zassert_equal(events[1].state, K_POLL_STATE_SEM_AVAILABLE, ""); in ZTEST()