From 2fc41c737686f8f98f5f8075154a383680192060 Mon Sep 17 00:00:00 2001 From: Dmugetsu <168934208+diegolix29@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:43:23 -0600 Subject: [PATCH] video_core: Use adaptive mutex on Linux --- src/video_core/buffer_cache/word_manager.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video_core/buffer_cache/word_manager.h b/src/video_core/buffer_cache/word_manager.h index 7ad33d7a64d..5ad724f9617 100644 --- a/src/video_core/buffer_cache/word_manager.h +++ b/src/video_core/buffer_cache/word_manager.h @@ -8,6 +8,9 @@ #include <span> #include <utility> +#ifdef __linux__ +#include "common/adaptive_mutex.h" +#endif #include "common/spin_lock.h" #include "common/types.h" #include "video_core/page_manager.h" @@ -272,7 +275,11 @@ class RegionManager { } } +#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP + Common::AdaptiveMutex lock; +#else Common::SpinLock lock; +#endif PageManager* tracker; VAddr cpu_addr = 0; WordsArray cpu;