diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-08 00:34:22 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-08 05:27:20 +0100 |
commit | 0209de123b0e8dfd793d23c6a9cb825ea6da5b8e (patch) | |
tree | b089c5609f00730b21c1d7d31d77a0dfd9106b10 /src/core/hle/kernel/svc.cpp | |
parent | Merge pull request #2196 from DarkLordZach/web-applet-esc (diff) | |
download | yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.tar yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.tar.gz yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.tar.bz2 yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.tar.lz yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.tar.xz yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.tar.zst yuzu-0209de123b0e8dfd793d23c6a9cb825ea6da5b8e.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 7f5c0cc86..82ceb235c 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1479,21 +1479,9 @@ static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout return ERR_INVALID_ADDRESS; } + const auto arbitration_type = static_cast<AddressArbiter::ArbitrationType>(type); auto& address_arbiter = Core::System::GetInstance().Kernel().AddressArbiter(); - switch (static_cast<AddressArbiter::ArbitrationType>(type)) { - case AddressArbiter::ArbitrationType::WaitIfLessThan: - return address_arbiter.WaitForAddressIfLessThan(address, value, timeout, false); - case AddressArbiter::ArbitrationType::DecrementAndWaitIfLessThan: - return address_arbiter.WaitForAddressIfLessThan(address, value, timeout, true); - case AddressArbiter::ArbitrationType::WaitIfEqual: - return address_arbiter.WaitForAddressIfEqual(address, value, timeout); - default: - LOG_ERROR(Kernel_SVC, - "Invalid arbitration type, expected WaitIfLessThan, DecrementAndWaitIfLessThan " - "or WaitIfEqual but got {}", - type); - return ERR_INVALID_ENUM_VALUE; - } + return address_arbiter.WaitForAddress(address, arbitration_type, value, timeout); } // Signals to an address (via Address Arbiter) |