diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-05 06:05:50 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-05 06:05:50 +0100 |
commit | cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30 (patch) | |
tree | f7896835845db0d11e77588402ff3636895da217 /src/core | |
parent | Merge pull request #415 from Dante38490/master (diff) | |
parent | AddressArbiter: Ported arbitration type 2 from 3dmoo. (diff) | |
download | yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.tar yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.tar.gz yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.tar.bz2 yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.tar.lz yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.tar.xz yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.tar.zst yuzu-cc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 38705e3cd..736bbc36a 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp @@ -51,6 +51,17 @@ ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s3 HLE::Reschedule(__func__); } break; + + case ArbitrationType::DecrementAndWaitIfLessThan: + { + s32 memory_value = Memory::Read32(address) - 1; + Memory::Write32(address, memory_value); + if (memory_value <= value) { + Kernel::WaitCurrentThread(WAITTYPE_ARB, handle, address); + HLE::Reschedule(__func__); + } + break; + } default: LOG_ERROR(Kernel, "unknown type=%d", type); |