Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

semaphore.h

Go to the documentation of this file.
00001 /* ndk - [ semaphore.h ]
00002  *
00003  * Routines for implementing semaphores
00004  *
00005  * (c)2004 dcipher / neuraldk
00006  *           www.neuraldk.org
00007  */
00008 
00017 #ifndef __ndk_mutex__
00018 #define __ndk_mutex__
00019 
00020 #include <errorCodes.h>
00021 #include <types.h>
00022 
00023 typedef struct _Semaphore *Semaphore;
00024 
00025 typedef enum _SemaphoreType
00026 {
00027    SemaphoreTypeFIFO,
00028    SemaphoreTypePriority
00029 } SemaphoreType;
00030 
00038 ErrorCode semaphoreCreate(Semaphore *semaphore, SemaphoreType type, uint32 initial);
00039 
00045 ErrorCode semaphoreUp(Semaphore semaphore);
00046 
00054 ErrorCode semaphoreDown(Semaphore semaphore, Timeout timeout);
00055 
00061 ErrorCode semaphoreDestroy(Semaphore *semaphore);
00062 
00063 #endif
00064 

Generated on Wed Mar 22 20:36:33 2006 for ndk by  doxygen 1.4.4