Home
last modified time | relevance | path

Searched refs:rwlock (Results 1 – 2 of 2) sorted by relevance

/bionic/libc/bionic/
Dpthread_rwlock.cpp227 pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface); in pthread_rwlock_init() local
229 memset(rwlock, 0, sizeof(pthread_rwlock_internal_t)); in pthread_rwlock_init()
232 rwlock->pshared = __rwlockattr_getpshared(attr); in pthread_rwlock_init()
236 rwlock->writer_nonrecursive_preferred = false; in pthread_rwlock_init()
239 rwlock->writer_nonrecursive_preferred = true; in pthread_rwlock_init()
249 atomic_init(&rwlock->state, 0); in pthread_rwlock_init()
250 rwlock->pending_lock.init(rwlock->pshared); in pthread_rwlock_init()
255 pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface); in pthread_rwlock_destroy() local
257 if (atomic_load_explicit(&rwlock->state, memory_order_relaxed) != 0) { in pthread_rwlock_destroy()
272 static inline __always_inline int __pthread_rwlock_tryrdlock(pthread_rwlock_internal_t* rwlock) { in __pthread_rwlock_tryrdlock() argument
[all …]
/bionic/tests/
Dpthread_test.cpp1738 pthread_rwlock_t* rwlock = reinterpret_cast<pthread_rwlock_t*>( in TEST() local
1740 ASSERT_EQ(0, pthread_rwlock_init(rwlock, NULL)); in TEST()
1741 ASSERT_EQ(0, pthread_rwlock_rdlock(rwlock)); in TEST()
1742 ASSERT_EQ(0, pthread_rwlock_unlock(rwlock)); in TEST()
1743 ASSERT_EQ(0, pthread_rwlock_wrlock(rwlock)); in TEST()
1744 ASSERT_EQ(0, pthread_rwlock_unlock(rwlock)); in TEST()
1745 ASSERT_EQ(0, pthread_rwlock_destroy(rwlock)); in TEST()