summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-05 06:05:50 +0100
committerbunnei <bunneidev@gmail.com>2015-01-05 06:05:50 +0100
commitcc23269ff4d4dbd38d6e76aa6c2f1d76c53f2e30 (patch)
treef7896835845db0d11e77588402ff3636895da217 /src/core/hle/kernel
parentMerge pull request #415 from Dante38490/master (diff)
parentAddressArbiter: Ported arbitration type 2 from 3dmoo. (diff)
downloadyuzu-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/hle/kernel')
-rw-r--r--src/core/hle/kernel/address_arbiter.cpp11
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);