diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-10-08 01:09:57 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-15 17:55:19 +0200 |
commit | 71768571775ff989a577a773574f5f5bdeb14d33 (patch) | |
tree | ca91bc1c7cb08c4ecf4f8079ac3755272d482cfb /src | |
parent | Kernel: Correct Results in Condition Variables and Mutexes (diff) | |
download | yuzu-71768571775ff989a577a773574f5f5bdeb14d33.tar yuzu-71768571775ff989a577a773574f5f5bdeb14d33.tar.gz yuzu-71768571775ff989a577a773574f5f5bdeb14d33.tar.bz2 yuzu-71768571775ff989a577a773574f5f5bdeb14d33.tar.lz yuzu-71768571775ff989a577a773574f5f5bdeb14d33.tar.xz yuzu-71768571775ff989a577a773574f5f5bdeb14d33.tar.zst yuzu-71768571775ff989a577a773574f5f5bdeb14d33.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 4c1d3fd18..de0a9064e 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp @@ -91,12 +91,20 @@ 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; + if (num_to_wake <= 0) { + if (waiting_threads.empty()) { + updated_value = value + 1; + } else { + updated_value = value - 1; + } } else { - updated_value = value; + if (waiting_threads.empty()) { + updated_value = value + 1; + } else if (waiting_threads.size() <= static_cast<u32>(num_to_wake)) { + updated_value = value - 1; + } else { + updated_value = value; + } } if (static_cast<s32>(Memory::Read32(address)) != value) { |