Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __SIMPLE_MUTEX_H
00010 #define __SIMPLE_MUTEX_H
00011
00012 #include "RakMemoryOverride.h"
00013 #if defined(_XBOX) || defined(X360)
00014
00015 #elif defined(_WIN32)
00016 #include "WindowsIncludes.h"
00017 #else
00018 #include <pthread.h>
00019 #include <sys/types.h>
00020 #endif
00021 #include "Export.h"
00026 class RAK_DLL_EXPORT SimpleMutex
00027 {
00028 public:
00029
00030
00031 SimpleMutex();
00032
00033
00034 ~SimpleMutex();
00035
00036
00037 void Lock(void);
00038
00039
00040 void Unlock(void);
00041 private:
00042 void Init(void);
00043 #ifdef _WIN32
00044 CRITICAL_SECTION criticalSection;
00045 #else
00046 pthread_mutex_t hMutex;
00047 #endif
00048
00049
00050 };
00051
00052 #endif
00053