diff options
Diffstat (limited to 'src/core/hle/kernel/k_address_arbiter.cpp')
-rw-r--r-- | src/core/hle/kernel/k_address_arbiter.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_address_arbiter.cpp b/src/core/hle/kernel/k_address_arbiter.cpp index affc04852..f2f497dc4 100644 --- a/src/core/hle/kernel/k_address_arbiter.cpp +++ b/src/core/hle/kernel/k_address_arbiter.cpp @@ -120,7 +120,10 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 s32 user_value{}; R_UNLESS(UpdateIfEqual(system, std::addressof(user_value), addr, value, value + 1), Svc::ResultInvalidCurrentMemory); - R_UNLESS_NOLOG(user_value == value, Svc::ResultInvalidState); + + if (user_value != value) { + return Svc::ResultInvalidState; + } auto it = thread_tree.nfind_light({addr, -1}); while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && @@ -211,7 +214,10 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 } R_UNLESS(succeeded, Svc::ResultInvalidCurrentMemory); - R_UNLESS_NOLOG(user_value == value, Svc::ResultInvalidState); + + if (user_value != value) { + return Svc::ResultInvalidState; + } while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && (it->GetAddressArbiterKey() == addr)) { |