diff options
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 | |||
| 1479 | return ERR_INVALID_ADDRESS; | 1479 | return ERR_INVALID_ADDRESS; |
| 1480 | } | 1480 | } |
| 1481 | 1481 | ||
| 1482 | const auto arbitration_type = static_cast<AddressArbiter::ArbitrationType>(type); | ||
| 1482 | auto& address_arbiter = Core::System::GetInstance().Kernel().AddressArbiter(); | 1483 | auto& address_arbiter = Core::System::GetInstance().Kernel().AddressArbiter(); |
| 1483 | switch (static_cast<AddressArbiter::ArbitrationType>(type)) { | 1484 | return address_arbiter.WaitForAddress(address, arbitration_type, value, timeout); |
| 1484 | case AddressArbiter::ArbitrationType::WaitIfLessThan: | ||
| 1485 | return address_arbiter.WaitForAddressIfLessThan(address, value, timeout, false); | ||
| 1486 | case AddressArbiter::ArbitrationType::DecrementAndWaitIfLessThan: | ||
| 1487 | return address_arbiter.WaitForAddressIfLessThan(address, value, timeout, true); | ||
| 1488 | case AddressArbiter::ArbitrationType::WaitIfEqual: | ||
| 1489 | return address_arbiter.WaitForAddressIfEqual(address, value, timeout); | ||
| 1490 | default: | ||
| 1491 | LOG_ERROR(Kernel_SVC, | ||
| 1492 | "Invalid arbitration type, expected WaitIfLessThan, DecrementAndWaitIfLessThan " | ||
| 1493 | "or WaitIfEqual but got {}", | ||
| 1494 | type); | ||
| 1495 | return ERR_INVALID_ENUM_VALUE; | ||
| 1496 | } | ||
| 1497 | } | 1485 | } |
| 1498 | 1486 | ||
| 1499 | // Signals to an address (via Address Arbiter) | 1487 | // Signals to an address (via Address Arbiter) |