diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-07 05:15:40 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-07-09 00:46:38 +0200 |
commit | 3eb89f3e98b118f7829d3e56f32bcacbe58afc46 (patch) | |
tree | a4e8761b1b55ca53941db9f2ce8c04f224226238 /src/core/hle/svc.cpp | |
parent | Thread: Added functions to resume threads from address arbitration. (diff) | |
download | yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.gz yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.bz2 yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.lz yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.xz yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.zst yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/svc.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 9130d77ec..17967f260 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -9,6 +9,7 @@ #include "core/mem_map.h" +#include "core/hle/kernel/address_arbiter.h" #include "core/hle/kernel/event.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/mutex.h" @@ -175,18 +176,19 @@ Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, bool wa } /// Create an address arbiter (to allocate access to shared resources) -Result CreateAddressArbiter(void* arbiter) { - ERROR_LOG(SVC, "(UNIMPLEMENTED) called"); - Core::g_app_core->SetReg(1, 0xFABBDADD); +Result CreateAddressArbiter(u32* arbiter) { + DEBUG_LOG(SVC, "called"); + Handle handle = Kernel::CreateAddressArbiter(); + *arbiter = handle; return 0; } /// Arbitrate address -Result ArbitrateAddress(Handle arbiter, u32 addr, u32 _type, u32 value, s64 nanoseconds) { - ERROR_LOG(SVC, "(UNIMPLEMENTED) called"); - ArbitrationType type = (ArbitrationType)_type; - Memory::Write32(addr, type); - return 0; +Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { + DEBUG_LOG(SVC, "called arbiter=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X, " + "nanoseconds=%d", arbiter, address, type, value, nanoseconds); + return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), address, + value); } /// Used to output a message on a debug hardware unit - does nothing on a retail unit |