14 lines
183 B
C
14 lines
183 B
C
|
#pragma once
|
||
|
|
||
|
#include <atomic>
|
||
|
|
||
|
class AtomicMutex {
|
||
|
public:
|
||
|
explicit AtomicMutex();
|
||
|
void lock() noexcept;
|
||
|
void unlock() noexcept;
|
||
|
|
||
|
private:
|
||
|
std::atomic_flag flag;
|
||
|
};
|