aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x/syncpoint_manager.cpp
diff options
context:
space:
mode:
authordarktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>2024-04-05 01:58:29 +0200
committerBriar <205427297+icybriarr@users.noreply.github.com>2025-04-04 03:40:46 +0200
commit616619c8f754dc1a783d91aa5b32f45e8df74172 (patch)
tree4aa2bdd001cbf38b58439f59e62ee7705af6a253 /src/video_core/host1x/syncpoint_manager.cpp
parent19a93a3fd1dd6a7db074d254990db073d62b08e3 (diff)
Port changes from Early Access
Diffstat (limited to 'src/video_core/host1x/syncpoint_manager.cpp')
-rw-r--r--src/video_core/host1x/syncpoint_manager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/host1x/syncpoint_manager.cpp b/src/video_core/host1x/syncpoint_manager.cpp
index 8f23ce5272..8f51c92af9 100644
--- a/src/video_core/host1x/syncpoint_manager.cpp
+++ b/src/video_core/host1x/syncpoint_manager.cpp
@@ -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) {