Lines Matching defs:UNLOCKED
42 LIBC_INLINE_VAR static constexpr FutexWordType UNLOCKED = 0b00;
70 if (state == UNLOCKED &&
83 futex.exchange(IN_CONTENTION, cpp::MemoryOrder::ACQUIRE) == UNLOCKED)
96 LIBC_INLINE static void init(RawMutex *mutex) { mutex->futex = UNLOCKED; }
97 LIBC_INLINE constexpr RawMutex() : futex(UNLOCKED) {}
99 FutexWordType expected = UNLOCKED;
114 FutexWordType prev = futex.exchange(UNLOCKED, cpp::MemoryOrder::RELEASE);
119 return prev != UNLOCKED;
122 LIBC_ASSERT(lock->futex == UNLOCKED && "Mutex destroyed while used.");
125 LIBC_INLINE void reset() { futex = UNLOCKED; }