![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: vlIpcMutex__rti__.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 *******************************************************************************/ 00010 00011 #ifndef VXWORKS 00012 00013 #ifndef vlIpcMutex__rti___H_ 00014 #define vlIpcMutex__rti___H_ 00015 00016 #include "rtiMsConfig.h" 00017 #include <vlutil/vlMachineTypes.h> 00018 #include "vlMutex__rti__.h" 00019 #include <vlutil/vlString.h> 00020 00021 #if WIN32 00022 #include <winsock2.h> 00023 #include <process.h> 00024 #else 00025 #include <pthread.h> 00026 #endif 00027 00032 00033 #ifdef DtUSE_UTILITIES_NAMESPACE 00034 namespace DtUSE_UTILITIES_NAMESPACE 00035 { 00036 #endif 00037 00043 class DT_DLL_RTIUTIL DtIpcMutex__rti__ : public MAKRti::DtMutex__rti__ 00044 { 00045 public: 00046 00048 #ifdef WIN32 00049 DtIpcMutex__rti__(const MAKRti::DtString& name); 00050 #else 00051 DtIpcMutex__rti__(pthread_mutex_t * mutex); 00052 #endif 00053 00054 virtual ~DtIpcMutex__rti__(); 00055 00056 protected: 00057 00058 public: 00060 virtual void init(); 00061 00063 virtual void lock(); 00064 00066 virtual void unlock(); 00067 00069 #ifdef WIN32 00070 virtual HANDLE mutex(); 00071 #else 00072 virtual pthread_mutex_t * mutex(); 00073 #endif 00074 00075 protected: 00076 00077 #ifdef WIN32 00078 HANDLE myMutex; 00079 #else //! WIN32 00080 pthread_mutex_t * myMutex; 00081 #endif //! WIN32 00082 00083 }; 00084 00085 #ifdef DtUSE_UTILITIES_NAMESPACE 00086 } 00087 #endif 00088 00089 #endif //! vlNamedMutex_H_ 00090 00091 #endif //! !VXWORKS