Add svcCreateSession

This commit is contained in:
Yuri Kunde Schlesner 2017-06-20 12:59:27 -07:00
parent ff559d2a90
commit 8eb2eb2d3e
2 changed files with 18 additions and 0 deletions

View File

@ -893,6 +893,13 @@ Result svcArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 v
*/
Result svcSendSyncRequest(Handle session);
/**
* @brief Creates a linked pair of session endpoints.
* @param[out] serverSession Pointer to output the created server endpoint handle to.
* @param[out] clientSession Pointer to output the created client endpoint handle to.
*/
Result svcCreateSession(Handle* serverSession, Handle* clientSession);
/**
* @brief Accepts a session.
* @param[out] session Pointer to output the created session handle to.

View File

@ -416,6 +416,17 @@ SVC_BEGIN svcCreatePort
bx lr
SVC_END
SVC_BEGIN svcCreateSession
push {r0, r1}
svc 0x49
ldr r3, [sp, #0]
str r1, [r3]
ldr r3, [sp, #4]
str r2, [r3]
add sp, sp, #8
bx lr
SVC_END
SVC_BEGIN svcAcceptSession
str r0, [sp, #-4]!
svc 0x4A