diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc/svc_condition_variable.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/core/hle/kernel/svc/svc_condition_variable.cpp b/src/core/hle/kernel/svc/svc_condition_variable.cpp index d6cfc87c5..8ad1a0b8f 100644 --- a/src/core/hle/kernel/svc/svc_condition_variable.cpp +++ b/src/core/hle/kernel/svc/svc_condition_variable.cpp @@ -43,14 +43,8 @@ Result WaitProcessWideKeyAtomic(Core::System& system, VAddr address, VAddr cv_ke } // Wait on the condition variable. - return system.Kernel().CurrentProcess()->WaitConditionVariable( - address, Common::AlignDown(cv_key, sizeof(u32)), tag, timeout); -} - -Result WaitProcessWideKeyAtomic32(Core::System& system, u32 address, u32 cv_key, u32 tag, - u32 timeout_ns_low, u32 timeout_ns_high) { - const auto timeout_ns = static_cast<s64>(timeout_ns_low | (u64{timeout_ns_high} << 32)); - return WaitProcessWideKeyAtomic(system, address, cv_key, tag, timeout_ns); + return GetCurrentProcess(system.Kernel()) + .WaitConditionVariable(address, Common::AlignDown(cv_key, sizeof(u32)), tag, timeout); } /// Signal process wide key @@ -58,11 +52,25 @@ void SignalProcessWideKey(Core::System& system, VAddr cv_key, s32 count) { LOG_TRACE(Kernel_SVC, "called, cv_key=0x{:X}, count=0x{:08X}", cv_key, count); // Signal the condition variable. - return system.Kernel().CurrentProcess()->SignalConditionVariable( - Common::AlignDown(cv_key, sizeof(u32)), count); + return GetCurrentProcess(system.Kernel()) + .SignalConditionVariable(Common::AlignDown(cv_key, sizeof(u32)), count); +} + +Result WaitProcessWideKeyAtomic64(Core::System& system, uint64_t address, uint64_t cv_key, + uint32_t tag, int64_t timeout_ns) { + R_RETURN(WaitProcessWideKeyAtomic(system, address, cv_key, tag, timeout_ns)); +} + +void SignalProcessWideKey64(Core::System& system, uint64_t cv_key, int32_t count) { + SignalProcessWideKey(system, cv_key, count); +} + +Result WaitProcessWideKeyAtomic64From32(Core::System& system, uint32_t address, uint32_t cv_key, + uint32_t tag, int64_t timeout_ns) { + R_RETURN(WaitProcessWideKeyAtomic(system, address, cv_key, tag, timeout_ns)); } -void SignalProcessWideKey32(Core::System& system, u32 cv_key, s32 count) { +void SignalProcessWideKey64From32(Core::System& system, uint32_t cv_key, int32_t count) { SignalProcessWideKey(system, cv_key, count); } |