Files
eden/src/common/spin_lock.h
T

22 lines
345 B
C++
Raw Normal View History

2020-02-04 11:23:12 -04:00
// Copyright 2020 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <atomic>
namespace Common {
class SpinLock {
public:
void lock();
void unlock();
bool try_lock();
2020-02-04 11:23:12 -04:00
private:
std::atomic_flag lck = ATOMIC_FLAG_INIT;
};
} // namespace Common