summaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorGravatar danzel2017-08-29 20:39:55 +1200
committerGravatar danzel2017-08-29 20:39:55 +1200
commit826606479682234c98e4dfa6e616e637a28d4fcc (patch)
treebe6cbcc451182e0ec9801470b9c454e94ba124c5 /src/core/memory.cpp
parentMerge pull request #2839 from Subv/global_kernel_lock (diff)
downloadyuzu-826606479682234c98e4dfa6e616e637a28d4fcc.tar.gz
yuzu-826606479682234c98e4dfa6e616e637a28d4fcc.tar.xz
yuzu-826606479682234c98e4dfa6e616e637a28d4fcc.zip
Use recursive_mutex instead of mutex to fix #2902
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r--src/core/memory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index a3c5f4a9d..097bc5b47 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -183,7 +183,7 @@ T Read(const VAddr vaddr) {
183 } 183 }
184 184
185 // The memory access might do an MMIO or cached access, so we have to lock the HLE kernel state 185 // The memory access might do an MMIO or cached access, so we have to lock the HLE kernel state
186 std::lock_guard<std::mutex> lock(HLE::g_hle_lock); 186 std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock);
187 187
188 PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; 188 PageType type = current_page_table->attributes[vaddr >> PAGE_BITS];
189 switch (type) { 189 switch (type) {
@@ -224,7 +224,7 @@ void Write(const VAddr vaddr, const T data) {
224 } 224 }
225 225
226 // The memory access might do an MMIO or cached access, so we have to lock the HLE kernel state 226 // The memory access might do an MMIO or cached access, so we have to lock the HLE kernel state
227 std::lock_guard<std::mutex> lock(HLE::g_hle_lock); 227 std::lock_guard<std::recursive_mutex> lock(HLE::g_hle_lock);
228 228
229 PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; 229 PageType type = current_page_table->attributes[vaddr >> PAGE_BITS];
230 switch (type) { 230 switch (type) {