Lines Matching refs:mtx
63 mtx_t mtx;
65 VERIFY3S(mtx_init(&mtx, mtx_plain), ==, thrd_success);
66 mtx_destroy(&mtx);
67 VERIFY3S(mtx_init(&mtx, mtx_timed), ==, thrd_success);
68 mtx_destroy(&mtx);
69 VERIFY3S(mtx_init(&mtx, mtx_plain | mtx_recursive), ==, thrd_success);
70 mtx_destroy(&mtx);
71 VERIFY3S(mtx_init(&mtx, mtx_timed | mtx_recursive), ==, thrd_success);
72 mtx_destroy(&mtx);
74 VERIFY3S(mtx_init(&mtx, UINT32_MAX), ==, thrd_error);
75 VERIFY3S(mtx_init(&mtx, 42), ==, thrd_error);
81 mtx_t mtx;
83 VERIFY3S(mtx_init(&mtx, mtx_plain | mtx_recursive), ==, thrd_success);
84 VERIFY3S(mtx_lock(&mtx), ==, thrd_success);
85 VERIFY3S(mtx_lock(&mtx), ==, thrd_success);
86 VERIFY3S(mtx_trylock(&mtx), ==, thrd_success);
87 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
88 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
89 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
90 mtx_destroy(&mtx);
96 mtx_t mtx;
98 VERIFY3S(mtx_init(&mtx, mtx_plain), ==, thrd_success);
99 VERIFY3S(mtx_trylock(&mtx), ==, thrd_success);
100 VERIFY3S(mtx_trylock(&mtx), ==, thrd_busy);
101 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
102 mtx_destroy(&mtx);
303 mtx_t mtx;
309 VERIFY3S(mtx_init(&mtx, mtx_plain), ==, thrd_success);
312 VERIFY3S(mtx_lock(&mtx), ==, thrd_success);
313 VERIFY3S(cnd_timedwait(&cnd, &mtx, &ts), ==, thrd_timedout);
314 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
316 mtx_destroy(&mtx);
323 mtx_t mtx;
328 VERIFY3S(mtx_init(&mtx, mtx_timed), ==, thrd_success);
329 VERIFY3S(mtx_lock(&mtx), ==, thrd_success);
330 VERIFY3S(mtx_timedlock(&mtx, &ts), ==, thrd_timedout);
331 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
332 mtx_destroy(&mtx);
338 mtx_t *mtx = arg;
344 VERIFY3S(mtx_trylock(mtx), ==, thrd_busy);
345 VERIFY3S(mtx_timedlock(mtx, &ts), ==, thrd_timedout);
353 mtx_t mtx;
356 VERIFY3S(mtx_init(&mtx, mtx_timed), ==, thrd_success);
357 VERIFY3S(mtx_lock(&mtx), ==, thrd_success);
359 VERIFY3S(thrd_create(&thrd, cthr_test_mtx_busy_thr, &mtx), ==,
363 VERIFY3S(mtx_unlock(&mtx), ==, thrd_success);
364 mtx_destroy(&mtx);