diff --git a/nx/include/switch/kernel/svc.h b/nx/include/switch/kernel/svc.h index 16ea9097..625537f9 100644 --- a/nx/include/switch/kernel/svc.h +++ b/nx/include/switch/kernel/svc.h @@ -690,6 +690,14 @@ Result svcCreatePort(Handle* portServer, Handle *portClient, s32 max_sessions, b */ Result svcManageNamedPort(Handle* portServer, const char* name, s32 maxSessions); +/** + * @brief Manages a named port. + * @return Result code. + * @note Syscall number 0x72. + * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. + */ +Result svcConnectToPort(Handle* session, Handle port); + ///@} ///@name Memory management diff --git a/nx/source/kernel/svc.s b/nx/source/kernel/svc.s index 3622e867..d338a5ba 100644 --- a/nx/source/kernel/svc.s +++ b/nx/source/kernel/svc.s @@ -364,6 +364,14 @@ SVC_BEGIN svcManageNamedPort ret SVC_END +SVC_BEGIN svcConnectToPort + str x0, [sp, #-16]! + svc 0x72 + ldr x2, [sp], #16 + str w1, [x2] + ret +SVC_END + SVC_BEGIN svcSetProcessMemoryPermission svc 0x73 ret