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

mutex.h

Go to the documentation of this file.
00001 /* ndk - [ mutex.h ]
00002  *
00003  * Routines for implementing mutual exclusion
00004  *
00005  * (c)2004 dcipher / neuraldk
00006  *           www.neuraldk.org
00007  */
00008 
00017 #include <errorCodes.h>
00018 #include <types.h>
00019 
00020 #ifndef __ndk_mutex_h__
00021 #define __ndk_mutex_h__
00022 
00023 typedef struct _Mutex *Mutex;
00024 
00025 // TODO: implement all these correctly!
00026 typedef enum _MutexType
00027 {
00028    MutexTypeRecursive = 0,
00029    MutexTypeNonRecursive = 1,
00030    MutexTypeFIFO = 0,
00031    MutexTypePriority = 2
00032 } MutexType;
00033 
00039 ErrorCode mutexCreate(Mutex *mutex, MutexType type);
00040 
00046 ErrorCode mutexLock(Mutex mutex, Timeout timeout);
00047 
00051 ErrorCode mutexUnlock(Mutex mutex);
00052 
00056 ErrorCode mutexDestroy(Mutex *mutex);
00057 
00058 #endif
00059 

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