mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Made cycle count atomic to avoid using a mutex
This commit is contained in:
@ -181,6 +181,15 @@ public:
|
||||
flag.Set(s);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Do(std::atomic<T>& atomic)
|
||||
{
|
||||
T temp = atomic.load();
|
||||
Do(temp);
|
||||
if (mode == MODE_READ)
|
||||
atomic.store(temp);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Do(T& x)
|
||||
{
|
||||
|
Reference in New Issue
Block a user