mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 17:25:46 +00:00
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.
This commit is contained in:
parent
a20eec1c58
commit
3db51801b4
2 changed files with 42 additions and 1 deletions
|
@ -59,6 +59,19 @@ void SvcWrap() {
|
|||
FuncReturn(retval);
|
||||
}
|
||||
|
||||
template <ResultCode func(u32*, u32*)>
|
||||
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 <ResultCode func(u32*, u64)>
|
||||
void SvcWrap() {
|
||||
u32 param_1 = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue