summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp8
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 @@
31#include "core/hle/kernel/timer.h" 31#include "core/hle/kernel/timer.h"
32#include "core/hle/kernel/vm_manager.h" 32#include "core/hle/kernel/vm_manager.h"
33#include "core/hle/kernel/wait_object.h" 33#include "core/hle/kernel/wait_object.h"
34#include "core/hle/lock.h"
34#include "core/hle/result.h" 35#include "core/hle/result.h"
35#include "core/hle/service/service.h" 36#include "core/hle/service/service.h"
36 37
@@ -1188,7 +1189,7 @@ struct FunctionDef {
1188 Func* func; 1189 Func* func;
1189 const char* name; 1190 const char* name;
1190}; 1191};
1191} 1192} // namespace
1192 1193
1193static const FunctionDef SVC_Table[] = { 1194static const FunctionDef SVC_Table[] = {
1194 {0x00, nullptr, "Unknown"}, 1195 {0x00, nullptr, "Unknown"},
@@ -1332,6 +1333,9 @@ MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70));
1332void CallSVC(u32 immediate) { 1333void CallSVC(u32 immediate) {
1333 MICROPROFILE_SCOPE(Kernel_SVC); 1334 MICROPROFILE_SCOPE(Kernel_SVC);
1334 1335
1336 // Lock the global kernel mutex when we enter the kernel HLE.
1337 std::lock_guard<std::mutex> lock(HLE::g_hle_lock);
1338
1335 const FunctionDef* info = GetSVCInfo(immediate); 1339 const FunctionDef* info = GetSVCInfo(immediate);
1336 if (info) { 1340 if (info) {
1337 if (info->func) { 1341 if (info->func) {
@@ -1342,4 +1346,4 @@ void CallSVC(u32 immediate) {
1342 } 1346 }
1343} 1347}
1344 1348
1345} // namespace 1349} // namespace SVC