/*---------------------------------------------------------------------------* Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------* Project: OS Semaphore API File: OSSemaphore.h Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifndef __OSSEMAPHORE_H__ #define __OSSEMAPHORE_H__ #define OSSEMAPHORE_TXT_TAG 0x73506852 #include #ifdef __cplusplus extern "C" { #endif typedef struct OSSemaphore { u32 txtTag; // 'sPhR' 0x73506852 char * name; // debug name or NULL u32 os_reserved1; s32 count; OSThreadQueue queue; } OSSemaphore; void OSInitSemaphore ( OSSemaphore* sem, s32 count ); void OSInitSemaphoreEx ( OSSemaphore* sem, s32 count, char * name ); s32 OSWaitSemaphore ( OSSemaphore* sem ); s32 OSTryWaitSemaphore ( OSSemaphore* sem ); s32 OSSignalSemaphore ( OSSemaphore* sem ); s32 OSGetSemaphoreCount( OSSemaphore* sem ); #ifdef __cplusplus } #endif #endif // __OSSEMAPHORE_H__