24 #ifndef PXR_BASE_TF_SPIN_MUTEX_H
25 #define PXR_BASE_TF_SPIN_MUTEX_H
125 return _lockState.exchange(
true, std::memory_order_acquire) ==
false;
140 _lockState.store(
false, std::memory_order_release);
145 TF_API void _AcquireContended();
147 std::atomic<bool> _lockState;
152 #endif // PXR_BASE_TF_SPIN_MUTEX_H
void Release()
Release this thread's lock on this mutex.
ScopedLock()
Construct a scoped lock not associated with a mutex.
~ScopedLock()
If this scoped lock is acquired, Release() it.
#define TF_DEV_AXIOM(cond)
void Acquire(TfSpinMutex &m)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
TfSpinMutex()
Construct a mutex, initially unlocked.
ScopedLock(TfSpinMutex &m)
Construct a scoped lock for mutex m and acquire a lock.