Home
last modified time | relevance | path

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

/bionic/libc/bionic/
Dpthread-rwlocks.c112 int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) in pthread_rwlock_init() argument
120 if (rwlock == NULL) in pthread_rwlock_init()
133 ret = pthread_mutex_init(&rwlock->lock, lock_attr); in pthread_rwlock_init()
137 ret = pthread_cond_init(&rwlock->cond, cond_attr); in pthread_rwlock_init()
139 pthread_mutex_destroy(&rwlock->lock); in pthread_rwlock_init()
143 rwlock->numLocks = 0; in pthread_rwlock_init()
144 rwlock->pendingReaders = 0; in pthread_rwlock_init()
145 rwlock->pendingWriters = 0; in pthread_rwlock_init()
146 rwlock->writerThreadId = 0; in pthread_rwlock_init()
151 int pthread_rwlock_destroy(pthread_rwlock_t *rwlock) in pthread_rwlock_destroy() argument
[all …]
/bionic/libc/kernel/common/linux/
Dspinlock.h50 #define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock) argument
51 #define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock) argument
52 #define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock) argument
53 #define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock) argument
54 #define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock) argument
55 #define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock) argument
57 #define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock) argument
58 #define write_can_lock(rwlock) __raw_write_can_lock(&(rwlock)->raw_lock) argument
/bionic/libc/include/
Dpthread.h243 int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr);
244 int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
246 int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
247 int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);
248 int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout);
250 int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);
251 int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);
252 int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout);
254 int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);