#include #ifdef STA_ATOMIC_ENABLED namespace sta { AtomicMutex::AtomicMutex() : lock_{ATOMIC_FLAG_INIT} {} void AtomicMutex::acquire() { while (lock_.test_and_set()); } void AtomicMutex::release() { lock_.clear(); } } // namespace sta #endif // STA_ATOMIC_ENABLED