Home
last modified time | relevance | path

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

/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_mutex.h105 if (atomic_compare_exchange_strong(&state_, &cmp, kWriteLock, in Lock()
112 u32 prev = atomic_fetch_sub(&state_, kWriteLock, memory_order_release); in Unlock()
113 DCHECK_NE(prev & kWriteLock, 0); in Unlock()
119 if ((prev & kWriteLock) == 0) in ReadLock()
126 DCHECK_EQ(prev & kWriteLock, 0); in ReadUnlock()
127 DCHECK_GT(prev & ~kWriteLock, 0); in ReadUnlock()
140 kWriteLock = 1, enumerator
152 atomic_compare_exchange_weak(&state_, &cmp, kWriteLock, in LockSlow()
165 if ((prev & kWriteLock) == 0) in ReadLockSlow()
/external/compiler-rt/lib/tsan/rtl/
Dtsan_mutex.cc182 const uptr kWriteLock = 1; variable
232 if (atomic_compare_exchange_strong(&state_, &cmp, kWriteLock, in Lock()
238 if (atomic_compare_exchange_weak(&state_, &cmp, kWriteLock, in Lock()
250 uptr prev = atomic_fetch_sub(&state_, kWriteLock, memory_order_release); in Unlock()
252 DCHECK_NE(prev & kWriteLock, 0); in Unlock()
263 if ((prev & kWriteLock) == 0) in ReadLock()
267 if ((prev & kWriteLock) == 0) { in ReadLock()
279 DCHECK_EQ(prev & kWriteLock, 0); in ReadUnlock()
280 DCHECK_GT(prev & ~kWriteLock, 0); in ReadUnlock()