diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_condition_variable.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_condition_variable.hpp index 5a5eaaf81..54ca7c1ac 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_condition_variable.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_condition_variable.hpp @@ -29,8 +29,8 @@ namespace ams::kern { constexpr KConditionVariable() : m_tree() { /* ... */ } /* Arbitration. */ - Result SignalToAddress(KProcessAddress addr); - Result WaitForAddress(ams::svc::Handle handle, KProcessAddress addr, u32 value); + static Result SignalToAddress(KProcessAddress addr); + static Result WaitForAddress(ams::svc::Handle handle, KProcessAddress addr, u32 value); /* Condition variable. */ void Signal(uintptr_t cv_key, s32 count); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp index 83267abbb..148d2b7bc 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp @@ -341,14 +341,6 @@ namespace ams::kern { void UnpinCurrentThread(); void UnpinThread(KThread *thread); - Result SignalToAddress(KProcessAddress address) { - return m_cond_var.SignalToAddress(address); - } - - Result WaitForAddress(ams::svc::Handle handle, KProcessAddress address, u32 tag) { - return m_cond_var.WaitForAddress(handle, address, tag); - } - void SignalConditionVariable(uintptr_t cv_key, int32_t count) { return m_cond_var.Signal(cv_key, count); } diff --git a/libraries/libmesosphere/source/svc/kern_svc_lock.cpp b/libraries/libmesosphere/source/svc/kern_svc_lock.cpp index 32c6a67b1..2f9d833a0 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_lock.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_lock.cpp @@ -30,7 +30,7 @@ namespace ams::kern::svc { R_UNLESS(!IsKernelAddress(address), svc::ResultInvalidCurrentMemory()); R_UNLESS(util::IsAligned(address, sizeof(u32)), svc::ResultInvalidAddress()); - return GetCurrentProcess().WaitForAddress(thread_handle, address, tag); + return KConditionVariable::WaitForAddress(thread_handle, address, tag); } Result ArbitrateUnlock(uintptr_t address) { @@ -38,7 +38,7 @@ namespace ams::kern::svc { R_UNLESS(!IsKernelAddress(address), svc::ResultInvalidCurrentMemory()); R_UNLESS(util::IsAligned(address, sizeof(u32)), svc::ResultInvalidAddress()); - return GetCurrentProcess().SignalToAddress(address); + return KConditionVariable::SignalToAddress(address); } }