diff options
| author | 2022-04-07 16:01:26 -0700 | |
|---|---|---|
| committer | 2022-04-11 21:13:40 -0700 | |
| commit | 8deaac8bd1707f56f29d61e427ad53964a0920fd (patch) | |
| tree | d17e4ed20b9249507ad587aa0eb82e277daff614 /src/core/hle/service/service.h | |
| parent | Merge pull request #8157 from lat9nq/kernel-races (diff) | |
| download | yuzu-8deaac8bd1707f56f29d61e427ad53964a0920fd.tar.gz yuzu-8deaac8bd1707f56f29d61e427ad53964a0920fd.tar.xz yuzu-8deaac8bd1707f56f29d61e427ad53964a0920fd.zip | |
hle: kernel: Use std::mutex instead of spin locks for most kernel locking.
Diffstat (limited to 'src/core/hle/service/service.h')
| -rw-r--r-- | src/core/hle/service/service.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index c78b2baeb..148265218 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #include <string> | 9 | #include <string> |
| 10 | #include <boost/container/flat_map.hpp> | 10 | #include <boost/container/flat_map.hpp> |
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "common/spin_lock.h" | ||
| 13 | #include "core/hle/kernel/hle_ipc.h" | 12 | #include "core/hle/kernel/hle_ipc.h" |
| 14 | 13 | ||
| 15 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 14 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| @@ -90,7 +89,7 @@ protected: | |||
| 90 | using HandlerFnP = void (Self::*)(Kernel::HLERequestContext&); | 89 | using HandlerFnP = void (Self::*)(Kernel::HLERequestContext&); |
| 91 | 90 | ||
| 92 | /// Used to gain exclusive access to the service members, e.g. from CoreTiming thread. | 91 | /// Used to gain exclusive access to the service members, e.g. from CoreTiming thread. |
| 93 | [[nodiscard]] std::scoped_lock<Common::SpinLock> LockService() { | 92 | [[nodiscard]] std::scoped_lock<std::mutex> LockService() { |
| 94 | return std::scoped_lock{lock_service}; | 93 | return std::scoped_lock{lock_service}; |
| 95 | } | 94 | } |
| 96 | 95 | ||
| @@ -135,7 +134,7 @@ private: | |||
| 135 | boost::container::flat_map<u32, FunctionInfoBase> handlers_tipc; | 134 | boost::container::flat_map<u32, FunctionInfoBase> handlers_tipc; |
| 136 | 135 | ||
| 137 | /// Used to gain exclusive access to the service members, e.g. from CoreTiming thread. | 136 | /// Used to gain exclusive access to the service members, e.g. from CoreTiming thread. |
| 138 | Common::SpinLock lock_service; | 137 | std::mutex lock_service; |
| 139 | }; | 138 | }; |
| 140 | 139 | ||
| 141 | /** | 140 | /** |