Refactor all std::lock_guard usages to std::scoped_lock

This commit is contained in:
Billy Laws
2022-04-25 15:00:30 +01:00
parent 94e6f3cfa0
commit 1dd230afde
22 changed files with 87 additions and 87 deletions

View File

@ -21,11 +21,11 @@ namespace skyline::gpu {
mirror = alignedMirror.subspan(static_cast<size_t>(guest->data() - alignedData), guest->size());
trapHandle = gpu.state.nce->TrapRegions(*guest, true, [this] {
std::lock_guard lock(*this);
std::scoped_lock lock{*this};
SynchronizeGuest(true); // We can skip trapping since the caller will do it
WaitOnFence();
}, [this] {
std::lock_guard lock(*this);
std::scoped_lock lock{*this};
SynchronizeGuest(true);
dirtyState = DirtyState::CpuDirty; // We need to assume the buffer is dirty since we don't know what the guest is writing
WaitOnFence();
@ -95,7 +95,7 @@ namespace skyline::gpu {
}
Buffer::~Buffer() {
std::lock_guard lock(*this);
std::scoped_lock lock{*this};
if (trapHandle)
gpu.state.nce->DeleteTrap(*trapHandle);
SynchronizeGuest(true);