diff options
| author | 2022-04-07 19:30:55 +0100 | |
|---|---|---|
| committer | 2022-04-07 19:30:55 +0100 | |
| commit | c589db6adde8e4706065b1ab00bd6814b39dc8bb (patch) | |
| tree | 19430d5342df4de9b8fc196012e53b09fb8f5f41 /src/common/host_memory.cpp | |
| parent | Merge pull request #8161 from liamwhite/gl-s8d24 (diff) | |
| download | yuzu-c589db6adde8e4706065b1ab00bd6814b39dc8bb.tar.gz yuzu-c589db6adde8e4706065b1ab00bd6814b39dc8bb.tar.xz yuzu-c589db6adde8e4706065b1ab00bd6814b39dc8bb.zip | |
common: Replace lock_guard with scoped_lock
Diffstat (limited to 'src/common/host_memory.cpp')
| -rw-r--r-- | src/common/host_memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index e829af1ac..802943eb7 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp | |||
| @@ -149,7 +149,7 @@ public: | |||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | void Unmap(size_t virtual_offset, size_t length) { | 151 | void Unmap(size_t virtual_offset, size_t length) { |
| 152 | std::lock_guard lock{placeholder_mutex}; | 152 | std::scoped_lock lock{placeholder_mutex}; |
| 153 | 153 | ||
| 154 | // Unmap until there are no more placeholders | 154 | // Unmap until there are no more placeholders |
| 155 | while (UnmapOnePlaceholder(virtual_offset, length)) { | 155 | while (UnmapOnePlaceholder(virtual_offset, length)) { |
| @@ -169,7 +169,7 @@ public: | |||
| 169 | } | 169 | } |
| 170 | const size_t virtual_end = virtual_offset + length; | 170 | const size_t virtual_end = virtual_offset + length; |
| 171 | 171 | ||
| 172 | std::lock_guard lock{placeholder_mutex}; | 172 | std::scoped_lock lock{placeholder_mutex}; |
| 173 | auto [it, end] = placeholders.equal_range({virtual_offset, virtual_end}); | 173 | auto [it, end] = placeholders.equal_range({virtual_offset, virtual_end}); |
| 174 | while (it != end) { | 174 | while (it != end) { |
| 175 | const size_t offset = std::max(it->lower(), virtual_offset); | 175 | const size_t offset = std::max(it->lower(), virtual_offset); |