diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-03-14 00:04:40 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-03-20 01:32:46 +0100 |
commit | 774f139e65eda2e0e0a76f859ae03b533786bbf9 (patch) | |
tree | d282b074b0e45685c2b6c92b09d550a287397418 /src/core/hle/kernel/address_arbiter.cpp | |
parent | Merge pull request #2258 from lioncash/am (diff) | |
download | yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.tar yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.tar.gz yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.tar.bz2 yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.tar.lz yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.tar.xz yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.tar.zst yuzu-774f139e65eda2e0e0a76f859ae03b533786bbf9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 352190da8..c8842410b 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp @@ -26,7 +26,7 @@ void WakeThreads(const std::vector<SharedPtr<Thread>>& waiting_threads, s32 num_ // them all. std::size_t last = waiting_threads.size(); if (num_to_wake > 0) { - last = num_to_wake; + last = std::min(last, static_cast<std::size_t>(num_to_wake)); } // Signal the waiting threads. @@ -90,9 +90,9 @@ ResultCode AddressArbiter::ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr a // Determine the modified value depending on the waiting count. s32 updated_value; if (waiting_threads.empty()) { - updated_value = value - 1; - } else if (num_to_wake <= 0 || waiting_threads.size() <= static_cast<u32>(num_to_wake)) { updated_value = value + 1; + } else if (num_to_wake <= 0 || waiting_threads.size() <= static_cast<u32>(num_to_wake)) { + updated_value = value - 1; } else { updated_value = value; } |