MAK RTIspy API Documentation for HLA Evolved
vlMutex__rti__.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1999 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: vlMutex__rti__.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00010 
00011 #ifndef VXWORKS
00012 
00013 #ifndef vlMutex__rti___H_
00014 #define vlMutex__rti___H_
00015 
00016 #include "rtiMsConfig.h"
00017 #include <vlutil/vlMachineTypes.h>
00018 
00019 #if WIN32
00020 #include <winsock2.h>
00021 #include <process.h>
00022 #else
00023 #include <pthread.h>
00024 #endif
00025 
00029 #define USE_CRITSEC
00030 
00031 #ifdef DtUSE_UTILITIES_NAMESPACE
00032 namespace DtUSE_UTILITIES_NAMESPACE
00033 {
00034 #endif
00035 
00040 class DT_DLL_RTIUTIL DtMutex__rti__
00041 {
00042 public:
00043 
00045    DtMutex__rti__();
00046 
00047 protected:
00048 
00050    DtMutex__rti__(const DtMutex__rti__ & orig);
00051 
00053    const DtMutex__rti__ & operator=(const DtMutex__rti__ & orig);
00054 
00055 public:
00057    virtual ~DtMutex__rti__();
00058 
00061    virtual void destroy();
00062 
00064    virtual void lock();
00065 
00067    virtual void unlock();
00068 
00070 #ifdef WIN32
00071    HANDLE mutex();
00072 #else //! WIN32
00073    pthread_mutex_t * mutex();
00074 #endif //! WIN32
00075 
00076 protected:
00077 
00078 #ifdef WIN32
00079 #ifdef USE_CRITSEC
00080    CRITICAL_SECTION myCriticalSection;
00081 #else
00082    HANDLE myMutex;
00083 #endif
00084 #else //! WIN32
00085    pthread_mutex_t   myPTMutex;
00086 #endif //! WIN32
00087 
00088 };
00089 
00090 #ifdef DtUSE_UTILITIES_NAMESPACE
00091 } 
00092 #endif
00093 
00094 #endif
00095 
00096 #endif

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)