Implement svcConnectToPort

This commit is contained in:
Michael Scire 2018-04-22 00:09:05 -06:00
parent cb668941c3
commit 8b57aa3092
2 changed files with 16 additions and 0 deletions

View File

@ -690,6 +690,14 @@ Result svcCreatePort(Handle* portServer, Handle *portClient, s32 max_sessions, b
*/ */
Result svcManageNamedPort(Handle* portServer, const char* name, s32 maxSessions); 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 ///@name Memory management

View File

@ -364,6 +364,14 @@ SVC_BEGIN svcManageNamedPort
ret ret
SVC_END 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_BEGIN svcSetProcessMemoryPermission
svc 0x73 svc 0x73
ret ret