Lines Matching full:mutex
22 static mtx_t mutex; variable
28 zassert_not_equal(thrd_success, mtx_init(&mutex, FORTY_TWO)); in ZTEST()
39 zassert_equal(thrd_success, mtx_init(&mutex, type)); in ZTEST()
40 mtx_destroy(&mutex); in ZTEST()
53 zassert_equal(thrd_success, mtx_init(&mutex, mtx_plain)); in ZTEST()
54 mtx_destroy(&mutex); in ZTEST()
65 /* test plain mutex */ in ZTEST()
69 zassert_equal(thrd_success, mtx_init(&mutex, type)); in ZTEST()
70 zassert_equal(thrd_success, mtx_lock(&mutex)); in ZTEST()
74 zassert_not_equal(thrd_success, mtx_lock((&mutex))); in ZTEST()
77 zassert_equal(thrd_success, mtx_lock(&mutex)); in ZTEST()
78 zassert_equal(thrd_success, mtx_unlock(&mutex)); in ZTEST()
80 zassert_equal(thrd_success, mtx_unlock(&mutex)); in ZTEST()
81 mtx_destroy(&mutex); in ZTEST()
112 zassert_equal(thrd_success, mtx_init(&mutex, mtx_timed)); in ZTEST()
115 zassert_equal(thrd_success, mtx_lock(&mutex)); in ZTEST()
116 zassert_equal(thrd_success, thrd_create(&th, mtx_timedlock_fn, &mutex)); in ZTEST()
123 zassert_equal(thrd_success, thrd_create(&th, mtx_timedlock_fn, &mutex)); in ZTEST()
126 zassert_equal(thrd_success, mtx_unlock(&mutex)); in ZTEST()
131 mtx_destroy(&mutex); in ZTEST()
145 zassert_equal(thrd_success, mtx_init(&mutex, mtx_plain)); in ZTEST()
148 zassert_equal(thrd_success, mtx_lock(&mutex)); in ZTEST()
149 zassert_equal(thrd_success, thrd_create(&th, mtx_trylock_fn, &mutex)); in ZTEST()
154 mtx_destroy(&mutex); in ZTEST()