Lines Matching defs:rwlock
44 SRWLOCK rwlock;
46 pthread_rwlock_t rwlock;
50 static inline int u_rwlock_init(struct u_rwlock *rwlock)
53 InitializeSRWLock(&rwlock->rwlock);
56 return pthread_rwlock_init(&rwlock->rwlock, NULL);
60 static inline int u_rwlock_destroy(struct u_rwlock *rwlock)
65 return pthread_rwlock_destroy(&rwlock->rwlock);
69 static inline int u_rwlock_rdlock(struct u_rwlock *rwlock)
72 AcquireSRWLockShared(&rwlock->rwlock);
75 return pthread_rwlock_rdlock(&rwlock->rwlock);
79 static inline int u_rwlock_rdunlock(struct u_rwlock *rwlock)
82 ReleaseSRWLockShared(&rwlock->rwlock);
85 return pthread_rwlock_unlock(&rwlock->rwlock);
89 static inline int u_rwlock_wrlock(struct u_rwlock *rwlock)
92 AcquireSRWLockExclusive(&rwlock->rwlock);
95 return pthread_rwlock_wrlock(&rwlock->rwlock);
99 static inline int u_rwlock_wrunlock(struct u_rwlock *rwlock)
102 ReleaseSRWLockExclusive(&rwlock->rwlock);
105 return pthread_rwlock_unlock(&rwlock->rwlock);