Lines Matching +full:- +full:q

4  * SPDX-License-Identifier: Apache-2.0
30 struct k_queue *q = p1; in child_thread_get() local
33 zassert_false(k_queue_is_empty(q)); in child_thread_get()
34 qd = k_queue_peek_head(q); in child_thread_get()
35 zassert_equal(qd->data, 0); in child_thread_get()
36 qd = k_queue_peek_tail(q); in child_thread_get()
37 zassert_equal(qd->data, (LIST_LEN * 2) - 1, in child_thread_get()
38 "got %d expected %d", qd->data, (LIST_LEN * 2) - 1); in child_thread_get()
41 qd = k_queue_get(q, K_FOREVER); in child_thread_get()
43 zassert_equal(qd->data, i); in child_thread_get()
44 if (qd->allocated) { in child_thread_get()
46 zassert_is_null(qd->snode.next, NULL); in child_thread_get()
51 zassert_true(k_queue_is_empty(q)); in child_thread_get()
54 qd = k_queue_get(q, K_FOREVER); in child_thread_get()
79 struct k_queue *q; in ZTEST() local
86 q = k_object_alloc(K_OBJ_QUEUE); in ZTEST()
87 zassert_not_null(q, "no memory for allocated queue object"); in ZTEST()
88 k_queue_init(q); in ZTEST()
95 /* Just for test purposes -- not safe to do this in the in ZTEST()
102 k_queue_append(q, &qdata[i]); in ZTEST()
107 zassert_false(k_queue_alloc_append(q, &qdata[i + 1])); in ZTEST()
111 child_thread_get, q, sem, NULL, K_HIGHEST_THREAD_PRIO, in ZTEST()
117 k_queue_cancel_wait(q); in ZTEST()
135 struct k_queue *q; in ZTEST_USER() local
137 q = k_object_alloc(K_OBJ_QUEUE); in ZTEST_USER()
138 zassert_not_null(q, "no memory for allocated queue object"); in ZTEST_USER()
139 k_queue_init(q); in ZTEST_USER()
143 zassert_false(k_queue_alloc_prepend(q, &qdata[i])); in ZTEST_USER()
146 for (int i = (LIST_LEN * 2) - 1; i >= 0; i--) { in ZTEST_USER()
149 qd = k_queue_get(q, K_NO_WAIT); in ZTEST_USER()
151 zassert_equal(qd->data, i); in ZTEST_USER()
169 struct k_queue *q; in ZTEST_USER() local
171 q = k_object_alloc(K_OBJ_QUEUE); in ZTEST_USER()
172 zassert_not_null(q, "no memory for allocated queue object"); in ZTEST_USER()
173 k_queue_init(q); in ZTEST_USER()
177 zassert_false(k_queue_alloc_append(q, &qdata[i])); in ZTEST_USER()
183 qd = k_queue_get(q, K_NO_WAIT); in ZTEST_USER()
185 zassert_equal(qd->data, i); in ZTEST_USER()
198 * auto-freed when they are de-queued, and the objects when all in ZTEST()