mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Made cycle count atomic to avoid using a mutex
This commit is contained in:
parent
6b6b5ed37f
commit
4051da75e4
3 changed files with 21 additions and 21 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue