Lines Matching refs:lock
14 pthread_spinlock_t lock; in ZTEST() local
18 zassert_equal(pthread_spin_init(&lock, 42), EINVAL, in ZTEST()
23 zassert_ok(pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE), "pthread_spin_init() failed"); in ZTEST()
24 zassert_ok(pthread_spin_destroy(&lock), "pthread_spin_destroy() failed"); in ZTEST()
29 pthread_spinlock_t lock[CONFIG_MAX_PTHREAD_SPINLOCK_COUNT]; in ZTEST() local
32 for (size_t i = 0; i < ARRAY_SIZE(lock); ++i) { in ZTEST()
33 zassert_ok(pthread_spin_init(&lock[i], PTHREAD_PROCESS_PRIVATE), in ZTEST()
37 zassert_equal(pthread_spin_init(&lock[CONFIG_MAX_PTHREAD_SPINLOCK_COUNT], in ZTEST()
43 for (size_t i = 0; i < ARRAY_SIZE(lock); ++i) { in ZTEST()
44 zassert_ok(pthread_spin_destroy(&lock[i]), in ZTEST()
52 pthread_spinlock_t lock; in ZTEST() local
61 zassert_ok(pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE), "pthread_spin_init() failed"); in ZTEST()
63 zassert_ok(pthread_spin_lock(&lock), "pthread_spin_lock() failed"); in ZTEST()
64 zassert_ok(pthread_spin_unlock(&lock), "pthread_spin_lock() failed"); in ZTEST()
66 zassert_ok(pthread_spin_trylock(&lock), "pthread_spin_trylock() failed"); in ZTEST()
67 zassert_ok(pthread_spin_unlock(&lock), "pthread_spin_unlock() failed"); in ZTEST()
69 zassert_ok(pthread_spin_destroy(&lock), "pthread_spin_init() failed"); in ZTEST()
70 zassert_equal(pthread_spin_destroy(&lock), EINVAL, "pthread_spin_unlock() did not fail"); in ZTEST()