diff options
| author | 2017-08-29 09:35:56 -0500 | |
|---|---|---|
| committer | 2017-08-29 09:35:56 -0500 | |
| commit | acbd46366c893537c3e63f510b8ba04adafc0c02 (patch) | |
| tree | 0b55a7ab31e9529a0c3179dc6fdb0b41eefc1dd4 /src/core/memory.cpp | |
| parent | Merge pull request #2901 from stone3311/master (diff) | |
| parent | Use recursive_mutex instead of mutex to fix #2902 (diff) | |
| download | yuzu-acbd46366c893537c3e63f510b8ba04adafc0c02.tar.gz yuzu-acbd46366c893537c3e63f510b8ba04adafc0c02.tar.xz yuzu-acbd46366c893537c3e63f510b8ba04adafc0c02.zip | |
Merge pull request #2905 from danzel/fix-2902
Use recursive_mutex instead of mutex to fix #2902
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 4 |
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) { |