Lines Matching refs:mq
14 mq_t mq; in mq_gen() local
17 assert_false(mq_init(&mq), "Unexpected mq_init() failure"); in mq_gen()
18 assert_u_eq(mq_count(&mq), 0, "mq should be empty"); in mq_gen()
19 assert_ptr_null(mq_tryget(&mq), in mq_gen()
22 mq_put(&mq, &msg); in mq_gen()
23 assert_u_eq(mq_count(&mq), 1, "mq should contain one message"); in mq_gen()
24 assert_ptr_eq(mq_tryget(&mq), &msg, "mq_tryget() should return msg"); in mq_gen()
26 mq_put(&mq, &msg); in mq_gen()
27 assert_ptr_eq(mq_get(&mq), &msg, "mq_get() should return msg"); in mq_gen()
29 mq_fini(&mq); in mq_gen()
36 mq_t *mq = (mq_t *)arg; in thd_receiver_start() local
40 mq_msg_t *msg = mq_get(mq); in thd_receiver_start()
50 mq_t *mq = (mq_t *)arg; in thd_sender_start() local
59 mq_put(mq, msg); in thd_sender_start()
66 mq_t mq; in TEST_BEGIN() local
71 assert_false(mq_init(&mq), "Unexpected mq_init() failure"); in TEST_BEGIN()
73 thd_create(&receiver, thd_receiver_start, (void *)&mq); in TEST_BEGIN()
75 thd_create(&senders[i], thd_sender_start, (void *)&mq); in TEST_BEGIN()
81 mq_fini(&mq); in TEST_BEGIN()