Lines Matching refs:rwlock
30 static uv_rwlock_t rwlock; variable
74 uv_rwlock_t rwlock; in TEST_IMPL() local
77 r = uv_rwlock_init(&rwlock); in TEST_IMPL()
80 uv_rwlock_rdlock(&rwlock); in TEST_IMPL()
81 uv_rwlock_rdunlock(&rwlock); in TEST_IMPL()
82 uv_rwlock_wrlock(&rwlock); in TEST_IMPL()
83 uv_rwlock_wrunlock(&rwlock); in TEST_IMPL()
84 uv_rwlock_destroy(&rwlock); in TEST_IMPL()
114 ASSERT_EQ(UV_EBUSY, uv_rwlock_tryrdlock(&rwlock)); in thread_rwlock_trylock_peer()
115 ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); in thread_rwlock_trylock_peer()
119 ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); in thread_rwlock_trylock_peer()
120 uv_rwlock_rdunlock(&rwlock); in thread_rwlock_trylock_peer()
121 ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); in thread_rwlock_trylock_peer()
125 ASSERT_OK(uv_rwlock_trywrlock(&rwlock)); in thread_rwlock_trylock_peer()
129 uv_rwlock_wrunlock(&rwlock); in thread_rwlock_trylock_peer()
130 ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); in thread_rwlock_trylock_peer()
133 uv_rwlock_rdunlock(&rwlock); in thread_rwlock_trylock_peer()
144 ASSERT_OK(uv_rwlock_init(&rwlock)); in TEST_IMPL()
150 ASSERT_OK(uv_rwlock_trywrlock(&rwlock)); in TEST_IMPL()
156 uv_rwlock_wrunlock(&rwlock); in TEST_IMPL()
157 ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); in TEST_IMPL()
161 uv_rwlock_rdunlock(&rwlock); in TEST_IMPL()
165 ASSERT_EQ(UV_EBUSY, uv_rwlock_tryrdlock(&rwlock)); in TEST_IMPL()
166 ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); in TEST_IMPL()
170 ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); in TEST_IMPL()
171 uv_rwlock_rdunlock(&rwlock); in TEST_IMPL()
172 ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); in TEST_IMPL()
176 uv_rwlock_destroy(&rwlock); in TEST_IMPL()