diff options
| author | 2019-04-01 14:36:24 -0400 | |
|---|---|---|
| committer | 2019-04-01 14:36:24 -0400 | |
| commit | e0eee250bb4d70f4fc4973f08649636faf9808cf (patch) | |
| tree | eaf2aabd5471c13fe89ac5f7da247b3bf1248e83 /src/core/hle | |
| parent | Merge pull request #2304 from lioncash/memsize (diff) | |
| parent | general: Use deducation guides for std::lock_guard and std::unique_lock (diff) | |
| download | yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.gz yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.xz yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.zip | |
Merge pull request #2312 from lioncash/locks
general: Use deducation guides for std::lock_guard and std::unique_lock
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nfp/nfp.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 3b73be67b..6baeb3494 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -34,7 +34,7 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] s64 cycles_ | |||
| 34 | const auto& system = Core::System::GetInstance(); | 34 | const auto& system = Core::System::GetInstance(); |
| 35 | 35 | ||
| 36 | // Lock the global kernel mutex when we enter the kernel HLE. | 36 | // Lock the global kernel mutex when we enter the kernel HLE. |
| 37 | std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock); | 37 | std::lock_guard lock{HLE::g_hle_lock}; |
| 38 | 38 | ||
| 39 | SharedPtr<Thread> thread = | 39 | SharedPtr<Thread> thread = |
| 40 | system.Kernel().RetrieveThreadFromWakeupCallbackHandleTable(proper_handle); | 40 | system.Kernel().RetrieveThreadFromWakeupCallbackHandleTable(proper_handle); |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index c408d4e22..76a8b0191 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -2138,7 +2138,7 @@ void CallSVC(u32 immediate) { | |||
| 2138 | MICROPROFILE_SCOPE(Kernel_SVC); | 2138 | MICROPROFILE_SCOPE(Kernel_SVC); |
| 2139 | 2139 | ||
| 2140 | // Lock the global kernel mutex when we enter the kernel HLE. | 2140 | // Lock the global kernel mutex when we enter the kernel HLE. |
| 2141 | std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock); | 2141 | std::lock_guard lock{HLE::g_hle_lock}; |
| 2142 | 2142 | ||
| 2143 | const FunctionDef* info = GetSVCInfo(immediate); | 2143 | const FunctionDef* info = GetSVCInfo(immediate); |
| 2144 | if (info) { | 2144 | if (info) { |
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 1c4482e47..c6babdd4d 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp | |||
| @@ -335,7 +335,7 @@ void Module::Interface::CreateUserInterface(Kernel::HLERequestContext& ctx) { | |||
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | bool Module::Interface::LoadAmiibo(const std::vector<u8>& buffer) { | 337 | bool Module::Interface::LoadAmiibo(const std::vector<u8>& buffer) { |
| 338 | std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock); | 338 | std::lock_guard lock{HLE::g_hle_lock}; |
| 339 | if (buffer.size() < sizeof(AmiiboFile)) { | 339 | if (buffer.size() < sizeof(AmiiboFile)) { |
| 340 | return false; | 340 | return false; |
| 341 | } | 341 | } |