mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-16 03:57:50 +00:00
k_server_session: preliminary support for userspace server sessions
This commit is contained in:
parent
a048c5ca0f
commit
545875eaa1
9 changed files with 346 additions and 49 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "core/core.h"
|
||||
#include "core/hle/kernel/svc_types.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -360,6 +361,23 @@ void SvcWrap64(Core::System& system) {
|
|||
FuncReturn(system, retval);
|
||||
}
|
||||
|
||||
// Used by ReplyAndReceive
|
||||
template <Result func(Core::System&, s32*, Handle*, s32, Handle, s64)>
|
||||
void SvcWrap64(Core::System& system) {
|
||||
s32 param_1 = 0;
|
||||
s32 num_handles = static_cast<s32>(Param(system, 2));
|
||||
|
||||
std::vector<Handle> handles(num_handles);
|
||||
system.Memory().ReadBlock(Param(system, 1), handles.data(), num_handles * sizeof(Handle));
|
||||
|
||||
const u32 retval = func(system, ¶m_1, handles.data(), num_handles,
|
||||
static_cast<s32>(Param(system, 3)), static_cast<s64>(Param(system, 4)))
|
||||
.raw;
|
||||
|
||||
system.CurrentArmInterface().SetReg(1, param_1);
|
||||
FuncReturn(system, retval);
|
||||
}
|
||||
|
||||
// Used by WaitForAddress
|
||||
template <Result func(Core::System&, u64, Svc::ArbitrationType, s32, s64)>
|
||||
void SvcWrap64(Core::System& system) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue