Lines Matching refs:mq
13 mq_t mq; in mq_gen() local
16 assert_false(mq_init(&mq), "Unexpected mq_init() failure"); in mq_gen()
17 assert_u_eq(mq_count(&mq), 0, "mq should be empty"); in mq_gen()
18 assert_ptr_null(mq_tryget(&mq), in mq_gen()
21 mq_put(&mq, &msg); in mq_gen()
22 assert_u_eq(mq_count(&mq), 1, "mq should contain one message"); in mq_gen()
23 assert_ptr_eq(mq_tryget(&mq), &msg, "mq_tryget() should return msg"); in mq_gen()
25 mq_put(&mq, &msg); in mq_gen()
26 assert_ptr_eq(mq_get(&mq), &msg, "mq_get() should return msg"); in mq_gen()
28 mq_fini(&mq); in mq_gen()
34 mq_t *mq = (mq_t *)arg; in thd_receiver_start() local
38 mq_msg_t *msg = mq_get(mq); in thd_receiver_start()
47 mq_t *mq = (mq_t *)arg; in thd_sender_start() local
56 mq_put(mq, msg); in thd_sender_start()
62 mq_t mq; in TEST_BEGIN() local
67 assert_false(mq_init(&mq), "Unexpected mq_init() failure"); in TEST_BEGIN()
69 thd_create(&receiver, thd_receiver_start, (void *)&mq); in TEST_BEGIN()
71 thd_create(&senders[i], thd_sender_start, (void *)&mq); in TEST_BEGIN()
79 mq_fini(&mq); in TEST_BEGIN()