diff options
| author | bunnei <bunneidev@gmail.com> | 2019-04-01 14:36:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-01 14:36:24 -0400 |
| commit | e0eee250bb4d70f4fc4973f08649636faf9808cf (patch) | |
| tree | eaf2aabd5471c13fe89ac5f7da247b3bf1248e83 /src/core/core_cpu.cpp | |
| parent | d9b7bc44748908d49d59433870211df8e1c32581 (diff) | |
| parent | 781ab8407b50d303197ab6fb888ed35ecbcce23a (diff) | |
Merge pull request #2312 from lioncash/locks
general: Use deducation guides for std::lock_guard and std::unique_lock
Diffstat (limited to 'src/core/core_cpu.cpp')
| -rw-r--r-- | src/core/core_cpu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 1eefed6d0..e75741db0 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp @@ -22,7 +22,7 @@ namespace Core { void CpuBarrier::NotifyEnd() { - std::unique_lock<std::mutex> lock(mutex); + std::unique_lock lock{mutex}; end = true; condition.notify_all(); } @@ -34,7 +34,7 @@ bool CpuBarrier::Rendezvous() { } if (!end) { - std::unique_lock<std::mutex> lock(mutex); + std::unique_lock lock{mutex}; --cores_waiting; if (!cores_waiting) { @@ -131,7 +131,7 @@ void Cpu::Reschedule() { reschedule_pending = false; // Lock the global kernel mutex when we manipulate the HLE state - std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock); + std::lock_guard lock{HLE::g_hle_lock}; scheduler->Reschedule(); } |
