aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_condition_variable.cpp
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2023-12-24 16:23:14 +0100
committerGitHub <noreply@github.com>2023-12-24 16:23:14 +0100
commit05e3db3ac9edbff0e4885ef8b42d3a2427c9f027 (patch)
tree2f959b67638ab1134cfca19ac1f041552a68c335 /src/core/hle/kernel/k_condition_variable.cpp
parent91290b9be4e99a9890c6545e327f600484e39914 (diff)
parentc57ae803a6e04f303c168292aaf727ccb61e5de2 (diff)
Merge pull request #12394 from liamwhite/per-process-memory
general: properly support multiple memory instances
Diffstat (limited to 'src/core/hle/kernel/k_condition_variable.cpp')
-rw-r--r--src/core/hle/kernel/k_condition_variable.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_condition_variable.cpp b/src/core/hle/kernel/k_condition_variable.cpp
index 7633a51fb..94ea3527a 100644
--- a/src/core/hle/kernel/k_condition_variable.cpp
+++ b/src/core/hle/kernel/k_condition_variable.cpp
@@ -28,10 +28,10 @@ bool WriteToUser(KernelCore& kernel, KProcessAddress address, const u32* p) {
return true;
}
-bool UpdateLockAtomic(Core::System& system, u32* out, KProcessAddress address, u32 if_zero,
+bool UpdateLockAtomic(KernelCore& kernel, u32* out, KProcessAddress address, u32 if_zero,
u32 new_orr_mask) {
- auto& monitor = system.Monitor();
- const auto current_core = system.Kernel().CurrentPhysicalCoreIndex();
+ auto& monitor = GetCurrentProcess(kernel).GetExclusiveMonitor();
+ const auto current_core = kernel.CurrentPhysicalCoreIndex();
u32 expected{};
@@ -208,7 +208,7 @@ void KConditionVariable::SignalImpl(KThread* thread) {
// TODO(bunnei): We should call CanAccessAtomic(..) here.
can_access = true;
if (can_access) [[likely]] {
- UpdateLockAtomic(m_system, std::addressof(prev_tag), address, own_tag,
+ UpdateLockAtomic(m_kernel, std::addressof(prev_tag), address, own_tag,
Svc::HandleWaitMask);
}
}