From d8a4a2b08dfdb737f1262096eed2cc677b2b8573 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 8 Jan 2023 19:27:30 +0000 Subject: [PATCH] Use a spinlock for GPU waiter thread --- app/src/main/cpp/skyline/gpu/interconnect/command_executor.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h index cd86fdd7..70c6ddfd 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/command_executor.h @@ -8,6 +8,7 @@ #include #include #include "command_nodes.h" +#include "common/spin_lock.h" namespace skyline::gpu::interconnect { /* @@ -99,8 +100,8 @@ namespace skyline::gpu::interconnect { private: const DeviceState &state; std::thread thread; - std::mutex mutex; - std::condition_variable condition; + SpinLock mutex; + std::condition_variable_any condition; std::queue, std::function>> pendingSignalQueue; //!< Queue of callbacks to be executed when their coressponding fence is signalled std::atomic idle{};