1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: svc_Stub.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 47347 $ 14 *---------------------------------------------------------------------------*/ 15 16 // 17 // Do not edit this file. 18 // This file is automatically generated. 19 // 20 21 #ifndef NN_SVC_SVC_STUB_H_ 22 #define NN_SVC_SVC_STUB_H_ 23 24 #include <nn/types.h> 25 #include <nn/Handle.h> 26 #include <nn/Result.h> 27 #include <nn/os/os_SvcTypes.autogen.h> 28 #include <nn/os/os_Types.h> 29 #include <nn/dbg/dbg_SmallSet.h> 30 31 32 33 #ifdef __cplusplus 34 35 namespace nn { 36 namespace svc { 37 38 nn::Result ControlMemory ( uptr* pOut, uptr addr, uptr addr2, size_t size, bit32 operation, bit32 permission ); 39 nn::Result QueryMemory ( nn::os::MemoryInfo* pBlockInfo, nn::os::PageInfo* pPageInfo, uptr addr ); 40 void ExitProcess (); 41 nn::Result GetProcessAffinityMask ( bit8 pAffinityMask[], nn::Handle process, s32 numProcessor ); 42 nn::Result SetProcessAffinityMask ( nn::Handle process, const bit8 pAffinityMask[], s32 numProcessor ); 43 nn::Result GetProcessIdealProcessor ( s32* pOut, nn::Handle process ); 44 nn::Result SetProcessIdealProcessor ( nn::Handle process, s32 processorNumber ); 45 nn::Result CreateThread ( nn::Handle* pOut, nn::os::ThreadFunc f, uptr param, uptr stackBottom, s32 prio, s32 cpuNo ); 46 void ExitThread (); 47 void SleepThread ( s64 ns ); 48 nn::Result GetThreadPriority ( s32* pOut, nn::Handle thread ); 49 nn::Result SetThreadPriority ( nn::Handle thread, s32 prio ); 50 nn::Result GetThreadAffinityMask ( bit8 pAffinityMask[], nn::Handle thread, s32 numProcessor ); 51 nn::Result SetThreadAffinityMask ( nn::Handle thread, const bit8 pAffinityMask[], s32 numProcessor ); 52 nn::Result GetThreadIdealProcessor ( s32* pOut, nn::Handle thread ); 53 nn::Result SetThreadIdealProcessor ( nn::Handle thread, s32 processorNumber ); 54 s32 GetCurrentProcessorNumber (); 55 nn::Result Run ( nn::Handle runner, const nn::os::StartupInfo& info ); 56 nn::Result CreateMutex ( nn::Handle* pOut, bool initialLocked ); 57 nn::Result ReleaseMutex ( nn::Handle mutex ); 58 nn::Result CreateSemaphore ( nn::Handle* pOut, s32 initialCount, s32 maxCount ); 59 nn::Result ReleaseSemaphore ( s32* pOut, nn::Handle semaphore, s32 releaseCount ); 60 nn::Result CreateEvent ( nn::Handle* pOut, nn::os::ResetType resetType ); 61 nn::Result SignalEvent ( nn::Handle event ); 62 nn::Result ClearEvent ( nn::Handle event ); 63 nn::Result CreateTimer ( nn::Handle* pOut, nn::os::ResetType resetType ); 64 nn::Result SetTimer ( nn::Handle timer, s64 initial, s64 interval ); 65 nn::Result CancelTimer ( nn::Handle timer ); 66 nn::Result ClearTimer ( nn::Handle timer ); 67 nn::Result CreateMemoryBlock ( nn::Handle* pOut, uptr pMemory, size_t size, bit32 myPermission, bit32 otherPermission ); 68 nn::Result MapMemoryBlock ( nn::Handle memBlock, uptr addr, bit32 myPermission, bit32 otherPermission ); 69 nn::Result UnmapMemoryBlock ( nn::Handle memBlock, uptr addr ); 70 nn::Result CreateAddressArbiter ( nn::Handle* arbiter ); 71 nn::Result ArbitrateAddress ( nn::Handle arbiter, uptr addr, nn::os::ArbitrationType type, s32 value, s64 ns ); 72 nn::Result CloseHandle ( nn::Handle handle ); 73 nn::Result WaitSynchronization1 ( nn::Handle handle, s64 ns ); 74 nn::Result WaitSynchronizationN ( s32* pOut, const nn::Handle handles[], s32 numHandles, bool waitAll, s64 ns ); 75 nn::Result SignalAndWait ( s32* pOut, nn::Handle toBeSignal, const nn::Handle handles[], s32 numHandles, bool waitAll, s64 ns ); 76 nn::Result DuplicateHandle ( nn::Handle* pOut, nn::Handle original ); 77 s64 GetSystemTick (); 78 nn::Result GetHandleInfo ( s64* pOut, nn::Handle handle, nn::os::HandleInfoType type ); 79 nn::Result GetSystemInfo ( s64* pOut, nn::os::SystemInfoType type, s32 param ); 80 nn::Result GetProcessInfo ( s64* pOut, nn::Handle process, nn::os::ProcessInfoType type ); 81 nn::Result GetThreadInfo ( s64* pOut, nn::Handle thread, nn::os::ThreadInfoType type ); 82 nn::Result ConnectToPort ( nn::Handle* pOut, const char8 name[] ); 83 nn::Result SendSyncRequest1 ( nn::Handle session ); 84 nn::Result SendSyncRequest2 ( nn::Handle session ); 85 nn::Result SendSyncRequest3 ( nn::Handle session ); 86 nn::Result SendSyncRequest4 ( nn::Handle session ); 87 nn::Result SendSyncRequest ( nn::Handle session ); 88 nn::Result OpenProcess ( nn::Handle* pOut, bit32 processId ); 89 nn::Result OpenThread ( nn::Handle* pOut, nn::Handle process, bit32 threadId ); 90 nn::Result GetProcessId ( bit32* pOut, nn::Handle process ); 91 nn::Result GetProcessIdOfThread ( bit32* pOut, nn::Handle thread ); 92 nn::Result GetThreadId ( bit32* pOut, nn::Handle thread ); 93 nn::Result GetResourceLimit ( nn::Handle* pOut, nn::Handle process ); 94 nn::Result GetResourceLimitLimitValues ( s64 values[], nn::Handle resourceLimit, const nn::os::LimitableResource names[], s32 numNames ); 95 nn::Result GetResourceLimitCurrentValues ( s64 values[], nn::Handle resourceLimit, const nn::os::LimitableResource names[], s32 umNames ); 96 nn::Result GetThreadContext ( nn::os::ThreadContext* pContext, nn::Handle thread ); 97 nn::Result CreatePort ( nn::Handle* pOutServer, nn::Handle* pOutClient, const char8 name[], s32 maxSessions ); 98 nn::Result CreateSessionToPort ( nn::Handle* pOut, nn::Handle port ); 99 nn::Result CreateSession ( nn::Handle* pServerSession, nn::Handle* pClientSession ); 100 nn::Result AcceptSession ( nn::Handle* pOut, nn::Handle port ); 101 nn::Result ReplyAndReceive1 ( s32* pIndex, const nn::Handle pHandles[], s32 numHandle, nn::Handle replyTarget ); 102 nn::Result ReplyAndReceive2 ( s32* pIndex, const nn::Handle pHandles[], s32 numHandle, nn::Handle replyTarget ); 103 nn::Result ReplyAndReceive3 ( s32* pIndex, const nn::Handle pHandles[], s32 numHandle, nn::Handle replyTarget ); 104 nn::Result ReplyAndReceive4 ( s32* pIndex, const nn::Handle pHandles[], s32 numHandle, nn::Handle replyTarget ); 105 nn::Result ReplyAndReceive ( s32* pIndex, const nn::Handle pHandles[], s32 numHandle, nn::Handle replyTarget ); 106 107 } // end of namespace svc 108 } // end of namespace nn 109 110 #endif // ifdef __cplusplus 111 112 113 114 115 #endif // ifndef NN_SVC_SVC_STUB_H_ 116