#include "atomicmutex.h" AtomicMutex::AtomicMutex(): flag() {} void AtomicMutex::lock() noexcept { while (flag.test_and_set()); } void AtomicMutex::unlock() noexcept { flag.clear(); }