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.cc181 const uptr kWriteLock = 1; variable
231 if (atomic_compare_exchange_strong(&state_, &cmp, kWriteLock, in Lock()
237 if (atomic_compare_exchange_weak(&state_, &cmp, kWriteLock, in Lock()
249 uptr prev = atomic_fetch_sub(&state_, kWriteLock, memory_order_release); in Unlock()
251 DCHECK_NE(prev & kWriteLock, 0); in Unlock()
262 if ((prev & kWriteLock) == 0) in ReadLock()
266 if ((prev & kWriteLock) == 0) { in ReadLock()
278 DCHECK_EQ(prev & kWriteLock, 0); in ReadUnlock()
279 DCHECK_GT(prev & ~kWriteLock, 0); in ReadUnlock()