00001
00002
00003 #ifndef MSP_CCSTHREADMUTEX_H
00004 #define MSP_CCSTHREADMUTEX_H
00005
00006 #ifndef WIN32
00007 # include <pthread.h>
00008 #endif
00009
00010 #include "DtccApi.h"
00011
00012 namespace MSP
00013 {
00014 class MSP_DTCC_API CCSThreadMutex
00015 {
00016 public:
00018 CCSThreadMutex();
00019
00021 ~CCSThreadMutex();
00022
00023 void lock() const;
00024
00025 void unlock() const;
00026
00027 private:
00028
00029 CCSThreadMutex(const CCSThreadMutex&);
00030 CCSThreadMutex &operator=( const CCSThreadMutex&);
00031
00032 #ifdef WIN32
00033 void *mutex;
00034 #else
00035 mutable pthread_mutex_t mutex;
00036 #endif
00037
00038 };
00039 }
00040 #endif
00041
00042