1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: svc_Inlines.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: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_SVC_SVC_INLINES_H_ 17 #define NN_SVC_SVC_INLINES_H_ 18 19 #include <nn/types.h> 20 #include <nn/Handle.h> 21 #include <nn/Result.h> 22 #include <nn/svc/svc_Stub.h> 23 #include <nn/os/os_SvcTypes.autogen.h> 24 25 26 27 #ifdef __cplusplus 28 29 namespace nn { 30 namespace svc { 31 CreateEvent(Handle * pOut,bool isManualReset)32 inline Result CreateEvent(Handle* pOut, bool isManualReset) 33 { 34 const os::ResetType rt = (isManualReset ? os::RESET_TYPE_STICKY: os::RESET_TYPE_ONESHOT); 35 return CreateEvent(pOut, rt); 36 } CreateTimer(Handle * pOut,bool isManualReset)37 inline Result CreateTimer(Handle* pOut, bool isManualReset) 38 { 39 const os::ResetType rt = (isManualReset ? os::RESET_TYPE_STICKY: os::RESET_TYPE_ONESHOT); 40 return CreateTimer(pOut, rt); 41 } WaitSynchronization(s32 * pOut,Handle handles[],s32 numHandles,bool waitAll,s64 timeout)42 inline Result WaitSynchronization(s32* pOut, Handle handles[], s32 numHandles, bool waitAll, s64 timeout) 43 { 44 // if( numHandles == 1 ) 45 // { 46 // *pOut = 0; 47 // return WaitSynchronization1(handles[0], timeout); 48 // } 49 // else 50 // { 51 return WaitSynchronizationN(pOut, handles, numHandles, waitAll, timeout); 52 // } 53 } 54 55 } // end of namespace svc 56 } // end of namespace nn 57 58 #endif // ifdef __cplusplus 59 60 61 62 63 #endif // ifndef NN_SVC_SVC_INLINES_H_ 64