From 0276a75f24cf12c2f82cf668a4562f8fa879f462 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 3 Jan 2015 12:09:11 -0500 Subject: AddressArbiter: Ported arbitration type 2 from 3dmoo. (Thanks 3dmoo!) --- src/core/hle/kernel/address_arbiter.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- cgit v1.2.3