1 /*---------------------------------------------------------------------------* 2 Project: Dolphin OS Semaphore API 3 File: OSSemaphore.h 4 5 Copyright 2001 Nintendo. 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 $Log: OSSemaphore.h,v $ 14 Revision 1.2 2006/02/04 11:56:48 hashida 15 (none) 16 17 Revision 1.1.1.1 2005/12/29 06:53:28 hiratsu 18 Initial import. 19 20 Revision 1.1.1.1 2005/05/12 02:41:07 yasuh-to 21 Ported from dolphin source tree. 22 23 24 1 2001/10/22 15:56 Shiki 25 Initial check-in. 26 $NoKeywords: $ 27 *---------------------------------------------------------------------------*/ 28 29 #ifndef __OSSEMAPHORE_H__ 30 #define __OSSEMAPHORE_H__ 31 32 #include <revolution/os/OSThread.h> 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 typedef struct OSSemaphore 39 { 40 s32 count; 41 OSThreadQueue queue; 42 } OSSemaphore; 43 44 void OSInitSemaphore ( OSSemaphore* sem, s32 count ); 45 s32 OSWaitSemaphore ( OSSemaphore* sem ); 46 s32 OSTryWaitSemaphore ( OSSemaphore* sem ); 47 s32 OSSignalSemaphore ( OSSemaphore* sem ); 48 s32 OSGetSemaphoreCount( OSSemaphore* sem ); 49 50 51 #ifdef __cplusplus 52 } 53 #endif 54 55 #endif // __OSSEMAPHORE_H__ 56