Skip to content

Commit

Permalink
video_core: Use adaptive mutex on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolix29 authored Jan 13, 2025
1 parent 2fc41c7 commit 964ac4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video_core/page_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

#include <memory>
#include <boost/icl/interval_map.hpp>
#ifdef __linux__
#include "common/adaptive_mutex.h"
#endif
#include "common/spin_lock.h"
#include "common/types.h"

Expand Down Expand Up @@ -36,7 +39,11 @@ class PageManager {
std::unique_ptr<Impl> impl;
Vulkan::Rasterizer* rasterizer;
boost::icl::interval_map<VAddr, s32> cached_pages;
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
Common::AdaptiveMutex lock;
#else
Common::SpinLock lock;
#endif
};

} // namespace VideoCore

0 comments on commit 964ac4a

Please sign in to comment.