diff options
| author | 2022-04-16 00:05:04 +0200 | |
|---|---|---|
| committer | 2022-04-16 00:05:04 +0200 | |
| commit | 34710065e84ccc3de4433b7dd0ffb569e14788b8 (patch) | |
| tree | 5e96d11546befd9671dff252e8e9e8a693b0bd1a /src/core/hle/service | |
| parent | Merge pull request #8190 from Docteh/palswap (diff) | |
| parent | core: hle: kernel: k_thread: Rework dummy thread waiting. (diff) | |
| download | yuzu-34710065e84ccc3de4433b7dd0ffb569e14788b8.tar.gz yuzu-34710065e84ccc3de4433b7dd0ffb569e14788b8.tar.xz yuzu-34710065e84ccc3de4433b7dd0ffb569e14788b8.zip | |
Merge pull request #8172 from bunnei/kernel-mutex
hle: kernel: Use std::mutex instead of spin locks for most kernel locking.
Diffstat (limited to 'src/core/hle/service')
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/service.h | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index cf727c167..42f9cf811 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -160,7 +160,8 @@ public: | |||
| 160 | 160 | ||
| 161 | class RelocatableObject final : public ServiceFramework<RelocatableObject> { | 161 | class RelocatableObject final : public ServiceFramework<RelocatableObject> { |
| 162 | public: | 162 | public: |
| 163 | explicit RelocatableObject(Core::System& system_) : ServiceFramework{system_, "ldr:ro"} { | 163 | explicit RelocatableObject(Core::System& system_) |
| 164 | : ServiceFramework{system_, "ldr:ro", ServiceThreadType::CreateNew} { | ||
| 164 | // clang-format off | 165 | // clang-format off |
| 165 | static const FunctionInfo functions[] = { | 166 | static const FunctionInfo functions[] = { |
| 166 | {0, &RelocatableObject::LoadModule, "LoadModule"}, | 167 | {0, &RelocatableObject::LoadModule, "LoadModule"}, |
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 | /** |