mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-07-07 15:20:46 -07:00
Merge yuzu-emu#12461
This commit is contained in:
@ -18,7 +18,7 @@ SyncpointManager::ActionHandle SyncpointManager::RegisterAction(
|
||||
return {};
|
||||
}
|
||||
|
||||
std::unique_lock lk(guard);
|
||||
std::scoped_lock lk(guard);
|
||||
if (syncpoint.load(std::memory_order_relaxed) >= expected_value) {
|
||||
action();
|
||||
return {};
|
||||
@ -35,7 +35,7 @@ SyncpointManager::ActionHandle SyncpointManager::RegisterAction(
|
||||
|
||||
void SyncpointManager::DeregisterAction(std::list<RegisteredAction>& action_storage,
|
||||
const ActionHandle& handle) {
|
||||
std::unique_lock lk(guard);
|
||||
std::scoped_lock lk(guard);
|
||||
|
||||
// We want to ensure the iterator still exists prior to erasing it
|
||||
// Otherwise, if an invalid iterator was passed in then it could lead to UB
|
||||
@ -78,7 +78,7 @@ void SyncpointManager::Increment(std::atomic<u32>& syncpoint, std::condition_var
|
||||
std::list<RegisteredAction>& action_storage) {
|
||||
auto new_value{syncpoint.fetch_add(1, std::memory_order_acq_rel) + 1};
|
||||
|
||||
std::unique_lock lk(guard);
|
||||
std::scoped_lock lk(guard);
|
||||
auto it = action_storage.begin();
|
||||
while (it != action_storage.end()) {
|
||||
if (it->expected_value > new_value) {
|
||||
|
Reference in New Issue
Block a user