diff options
author | Liam <byteslice@airmail.cc> | 2023-03-07 01:45:40 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-13 03:06:53 +0100 |
commit | d24ab14126a761ae40ce5d4964083390f1d7b396 (patch) | |
tree | 2658ea0b5078404676df31f01042c523cf824c8b /src/core/hle/kernel/k_address_arbiter.h | |
parent | Merge pull request #9942 from liamwhite/speling (diff) | |
download | yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.gz yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.bz2 yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.lz yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.xz yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.zst yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_address_arbiter.h | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/core/hle/kernel/k_address_arbiter.h b/src/core/hle/kernel/k_address_arbiter.h index e4085ae22..9a8c1ae94 100644 --- a/src/core/hle/kernel/k_address_arbiter.h +++ b/src/core/hle/kernel/k_address_arbiter.h @@ -22,47 +22,46 @@ class KAddressArbiter { public: using ThreadTree = KConditionVariable::ThreadTree; - explicit KAddressArbiter(Core::System& system_); + explicit KAddressArbiter(Core::System& system); ~KAddressArbiter(); - [[nodiscard]] Result SignalToAddress(VAddr addr, Svc::SignalType type, s32 value, s32 count) { + Result SignalToAddress(VAddr addr, Svc::SignalType type, s32 value, s32 count) { switch (type) { case Svc::SignalType::Signal: - return Signal(addr, count); + R_RETURN(this->Signal(addr, count)); case Svc::SignalType::SignalAndIncrementIfEqual: - return SignalAndIncrementIfEqual(addr, value, count); + R_RETURN(this->SignalAndIncrementIfEqual(addr, value, count)); case Svc::SignalType::SignalAndModifyByWaitingCountIfEqual: - return SignalAndModifyByWaitingCountIfEqual(addr, value, count); + R_RETURN(this->SignalAndModifyByWaitingCountIfEqual(addr, value, count)); + default: + UNREACHABLE(); } - ASSERT(false); - return ResultUnknown; } - [[nodiscard]] Result WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value, - s64 timeout) { + Result WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value, s64 timeout) { switch (type) { case Svc::ArbitrationType::WaitIfLessThan: - return WaitIfLessThan(addr, value, false, timeout); + R_RETURN(WaitIfLessThan(addr, value, false, timeout)); case Svc::ArbitrationType::DecrementAndWaitIfLessThan: - return WaitIfLessThan(addr, value, true, timeout); + R_RETURN(WaitIfLessThan(addr, value, true, timeout)); case Svc::ArbitrationType::WaitIfEqual: - return WaitIfEqual(addr, value, timeout); + R_RETURN(WaitIfEqual(addr, value, timeout)); + default: + UNREACHABLE(); } - ASSERT(false); - return ResultUnknown; } private: - [[nodiscard]] Result Signal(VAddr addr, s32 count); - [[nodiscard]] Result SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 count); - [[nodiscard]] Result SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 value, s32 count); - [[nodiscard]] Result WaitIfLessThan(VAddr addr, s32 value, bool decrement, s64 timeout); - [[nodiscard]] Result WaitIfEqual(VAddr addr, s32 value, s64 timeout); + Result Signal(VAddr addr, s32 count); + Result SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 count); + Result SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 value, s32 count); + Result WaitIfLessThan(VAddr addr, s32 value, bool decrement, s64 timeout); + Result WaitIfEqual(VAddr addr, s32 value, s64 timeout); - ThreadTree thread_tree; - - Core::System& system; - KernelCore& kernel; +private: + ThreadTree m_tree; + Core::System& m_system; + KernelCore& m_kernel; }; } // namespace Kernel |