diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-08 00:42:44 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-08 05:27:47 +0100 |
commit | b7f331afa3db235db39eca041fef720873f3091a (patch) | |
tree | cf2a5f7a3744fb7ed2104bf166aa65433377f1c1 /src/core/hle/kernel/svc.cpp | |
parent | kernel/svc: Move address arbiter waiting behind a unified API function (diff) | |
download | yuzu-b7f331afa3db235db39eca041fef720873f3091a.tar yuzu-b7f331afa3db235db39eca041fef720873f3091a.tar.gz yuzu-b7f331afa3db235db39eca041fef720873f3091a.tar.bz2 yuzu-b7f331afa3db235db39eca041fef720873f3091a.tar.lz yuzu-b7f331afa3db235db39eca041fef720873f3091a.tar.xz yuzu-b7f331afa3db235db39eca041fef720873f3091a.tar.zst yuzu-b7f331afa3db235db39eca041fef720873f3091a.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 82ceb235c..d44def658 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1499,22 +1499,9 @@ static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to return ERR_INVALID_ADDRESS; } + const auto signal_type = static_cast<AddressArbiter::SignalType>(type); auto& address_arbiter = Core::System::GetInstance().Kernel().AddressArbiter(); - switch (static_cast<AddressArbiter::SignalType>(type)) { - case AddressArbiter::SignalType::Signal: - return address_arbiter.SignalToAddress(address, num_to_wake); - case AddressArbiter::SignalType::IncrementAndSignalIfEqual: - return address_arbiter.IncrementAndSignalToAddressIfEqual(address, value, num_to_wake); - case AddressArbiter::SignalType::ModifyByWaitingCountAndSignalIfEqual: - return address_arbiter.ModifyByWaitingCountAndSignalToAddressIfEqual(address, value, - num_to_wake); - default: - LOG_ERROR(Kernel_SVC, - "Invalid signal type, expected Signal, IncrementAndSignalIfEqual " - "or ModifyByWaitingCountAndSignalIfEqual but got {}", - type); - return ERR_INVALID_ENUM_VALUE; - } + return address_arbiter.SignalToAddress(address, signal_type, value, num_to_wake); } /// This returns the total CPU ticks elapsed since the CPU was powered-on |