diff --git a/libctru/include/3ds/svc.h b/libctru/include/3ds/svc.h index e2fea04..2ad49f1 100644 --- a/libctru/include/3ds/svc.h +++ b/libctru/include/3ds/svc.h @@ -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. diff --git a/libctru/source/svc.s b/libctru/source/svc.s index 58a0b4e..bfc561a 100644 --- a/libctru/source/svc.s +++ b/libctru/source/svc.s @@ -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