summaryrefslogtreecommitdiffstats
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-11-14 18:23:11 +0100
committerGitHub <noreply@github.com>2023-11-14 18:23:11 +0100
commit9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614 (patch)
tree79adeb345dc422ae213054bfc7bc0a91f1094c47 /src/core/core_timing.cpp
parentMerge pull request #12025 from liamwhite/kernel-shutdown-deadlock (diff)
parentcore_timing: lock event queue access (diff)
downloadyuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.tar
yuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.tar.gz
yuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.tar.bz2
yuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.tar.lz
yuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.tar.xz
yuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.tar.zst
yuzu-9a5ef835cc8cf3d9fb8fa791d03a43ae4472d614.zip
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index e671b270f..d6b5abc68 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -76,6 +76,7 @@ void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) {
}
void CoreTiming::ClearPendingEvents() {
+ std::scoped_lock lock{basic_lock};
event_queue.clear();
}
@@ -113,6 +114,7 @@ bool CoreTiming::IsRunning() const {
}
bool CoreTiming::HasPendingEvents() const {
+ std::scoped_lock lock{basic_lock};
return !(wait_set && event_queue.empty());
}