diff options
| author | 2021-02-04 16:56:57 -0800 | |
|---|---|---|
| committer | 2021-02-05 14:03:36 -0800 | |
| commit | ea4f62615e71cd2b680517b7609928ed0abf216d (patch) | |
| tree | e324ee348627fccb5706ad11fcb316877f4aaa3f /src/core | |
| parent | hle: kernel: KAddressArbiter: Remove noisy error log. (diff) | |
| download | yuzu-ea4f62615e71cd2b680517b7609928ed0abf216d.tar.gz yuzu-ea4f62615e71cd2b680517b7609928ed0abf216d.tar.xz yuzu-ea4f62615e71cd2b680517b7609928ed0abf216d.zip | |
hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/kernel/k_address_arbiter.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_readable_event.cpp | 4 |
2 files changed, 11 insertions, 3 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 | |||
| 120 | s32 user_value{}; | 120 | s32 user_value{}; |
| 121 | R_UNLESS(UpdateIfEqual(system, std::addressof(user_value), addr, value, value + 1), | 121 | R_UNLESS(UpdateIfEqual(system, std::addressof(user_value), addr, value, value + 1), |
| 122 | Svc::ResultInvalidCurrentMemory); | 122 | Svc::ResultInvalidCurrentMemory); |
| 123 | R_UNLESS_NOLOG(user_value == value, Svc::ResultInvalidState); | 123 | |
| 124 | if (user_value != value) { | ||
| 125 | return Svc::ResultInvalidState; | ||
| 126 | } | ||
| 124 | 127 | ||
| 125 | auto it = thread_tree.nfind_light({addr, -1}); | 128 | auto it = thread_tree.nfind_light({addr, -1}); |
| 126 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && | 129 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && |
| @@ -211,7 +214,10 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 | |||
| 211 | } | 214 | } |
| 212 | 215 | ||
| 213 | R_UNLESS(succeeded, Svc::ResultInvalidCurrentMemory); | 216 | R_UNLESS(succeeded, Svc::ResultInvalidCurrentMemory); |
| 214 | R_UNLESS_NOLOG(user_value == value, Svc::ResultInvalidState); | 217 | |
| 218 | if (user_value != value) { | ||
| 219 | return Svc::ResultInvalidState; | ||
| 220 | } | ||
| 215 | 221 | ||
| 216 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && | 222 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && |
| 217 | (it->GetAddressArbiterKey() == addr)) { | 223 | (it->GetAddressArbiterKey() == addr)) { |
diff --git a/src/core/hle/kernel/k_readable_event.cpp b/src/core/hle/kernel/k_readable_event.cpp index cd15aa529..d8a42dbaf 100644 --- a/src/core/hle/kernel/k_readable_event.cpp +++ b/src/core/hle/kernel/k_readable_event.cpp | |||
| @@ -46,7 +46,9 @@ ResultCode KReadableEvent::Clear() { | |||
| 46 | ResultCode KReadableEvent::Reset() { | 46 | ResultCode KReadableEvent::Reset() { |
| 47 | KScopedSchedulerLock lk{kernel}; | 47 | KScopedSchedulerLock lk{kernel}; |
| 48 | 48 | ||
| 49 | R_UNLESS_NOLOG(is_signaled, Svc::ResultInvalidState); | 49 | if (!is_signaled) { |
| 50 | return Svc::ResultInvalidState; | ||
| 51 | } | ||
| 50 | 52 | ||
| 51 | is_signaled = false; | 53 | is_signaled = false; |
| 52 | return RESULT_SUCCESS; | 54 | return RESULT_SUCCESS; |