summaryrefslogtreecommitdiff
path: root/src/core/hle/lock.cpp
diff options
context:
space:
mode:
authorGravatar Subv2017-07-20 23:52:50 -0500
committerGravatar Subv2017-08-22 09:30:55 -0500
commitbca8916cea9c437d82509f8350fa3b858720f90e (patch)
tree68375d2bac3a42e64e95702d2edaf8e1825af061 /src/core/hle/lock.cpp
parentMerge pull request #2833 from j-selby/single-header-json (diff)
downloadyuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.gz
yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.tar.xz
yuzu-bca8916cea9c437d82509f8350fa3b858720f90e.zip
Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
This mutex is acquired in SVC::CallSVC, ie, as soon as the guest application enters the HLE kernel, and should be acquired by the aforementioned threads before modifying kernel structures.
Diffstat (limited to 'src/core/hle/lock.cpp')
-rw-r--r--src/core/hle/lock.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/lock.cpp b/src/core/hle/lock.cpp
new file mode 100644
index 000000000..082f689c8
--- /dev/null
+++ b/src/core/hle/lock.cpp
@@ -0,0 +1,11 @@
1// Copyright 2017 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <core/hle/lock.h>
8
9namespace HLE {
10std::mutex g_hle_lock;
11}