From 2a1f59b3017d6937138bfeacd9c04339f7d1526d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 4 Dec 2018 15:11:18 -0500 Subject: kernel/svc: Implement svcCreateEvent() svcCreateEvent operates by creating both a readable and writable event and then attempts to add both to the current process' handle table. If adding either of the events to the handle table fails, then the relevant error from the handle table is returned. If adding the readable event after the writable event to the table fails, then the writable event is removed from the handle table and the relevant error from the handle table is returned. Note that since we do not currently test resource limits, we don't check the resource limit table yet. --- src/core/hle/kernel/svc_wrap.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/core/hle/kernel/svc_wrap.h') diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index fa1116624..24aef46c9 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h @@ -59,6 +59,19 @@ void SvcWrap() { FuncReturn(retval); } +template +void SvcWrap() { + u32 param_1 = 0; + u32 param_2 = 0; + const u32 retval = func(¶m_1, ¶m_2).raw; + + auto& arm_interface = Core::CurrentArmInterface(); + arm_interface.SetReg(1, param_1); + arm_interface.SetReg(2, param_2); + + FuncReturn(retval); +} + template void SvcWrap() { u32 param_1 = 0; -- cgit v1.2.3