mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 04:52:39 +02:00
25 lines
640 B
C
25 lines
640 B
C
/**
|
|
* @file svc.h
|
|
* @brief Syscall wrappers.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "types.h"
|
|
|
|
/// Pseudo handle for the current process
|
|
#define CUR_PROCESS_HANDLE 0xFFFF8001
|
|
|
|
/// Pseudo handle for the current thread
|
|
#define CUR_THREAD_HANDLE 0xFFFF8000
|
|
|
|
static inline void* armGetTls(void) {
|
|
void* ret;
|
|
__asm__ ("mrs %x[data], tpidrro_el0" : [data] "=r" (ret));
|
|
return ret;
|
|
}
|
|
|
|
Result svcConnectToNamedPort(Handle* session, const char* name);
|
|
Result svcReplyAndReceive(s32* index, const Handle* handles, s32 handleCount, Handle replyTarget, u64 timeout);
|
|
Result svcManageNamedPort(Handle* portServer, const char* name, s32 maxSessions);
|
|
|