diff options
author | Subv <subv2112@gmail.com> | 2017-07-21 06:52:50 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-08-22 16:30:55 +0200 |
commit | bca8916cea9c437d82509f8350fa3b858720f90e (patch) | |
tree | 68375d2bac3a42e64e95702d2edaf8e1825af061 /src/core/hle/svc.cpp | |
parent | Merge pull request #2833 from j-selby/single-header-json (diff) | |
download | yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.gz yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.bz2 yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.lz yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.xz yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.zst yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/svc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index e4b803046..b98938cb4 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -31,6 +31,7 @@ #include "core/hle/kernel/timer.h" #include "core/hle/kernel/vm_manager.h" #include "core/hle/kernel/wait_object.h" +#include "core/hle/lock.h" #include "core/hle/result.h" #include "core/hle/service/service.h" @@ -1188,7 +1189,7 @@ struct FunctionDef { Func* func; const char* name; }; -} +} // namespace static const FunctionDef SVC_Table[] = { {0x00, nullptr, "Unknown"}, @@ -1332,6 +1333,9 @@ MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70)); void CallSVC(u32 immediate) { MICROPROFILE_SCOPE(Kernel_SVC); + // Lock the global kernel mutex when we enter the kernel HLE. + std::lock_guard<std::mutex> lock(HLE::g_hle_lock); + const FunctionDef* info = GetSVCInfo(immediate); if (info) { if (info->func) { @@ -1342,4 +1346,4 @@ void CallSVC(u32 immediate) { } } -} // namespace +} // namespace SVC |