MAK RTIspy API Documentation for HLA 1.3
vlIpcRdWrLock__rti__.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2005 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: vlIpcRdWrLock__rti__.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00010 
00011 #ifndef VXWORKS
00012 
00013 #ifndef vlIpcRdWrLock__rti___H_
00014 #define vlIpcRdWrLock__rti___H_
00015 
00016 #include "rtiMsConfig.h"
00017 #include <vlutil/vlMachineTypes.h>
00018 #include "vlRdWrLock__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 
00028 #ifdef DtUSE_UTILITIES_NAMESPACE
00029 namespace DtUSE_UTILITIES_NAMESPACE
00030 {
00031 #endif
00032 
00038 class DT_DLL_RTIUTIL DtIpcRdWrLock__rti__ : public DtRdWrLock__rti__
00039 {
00040 public:
00041 
00043 #ifdef WIN32
00044    DtIpcRdWrLock__rti__(const MAKRti::DtString& name);
00045 #else
00046    DtIpcRdWrLock__rti__(pthread_rwlock_t * sharedLock);
00047 #endif
00048 
00049 public:
00051    virtual ~DtIpcRdWrLock__rti__();
00052 
00054    virtual void init();
00055 
00057    virtual void destroy();
00058 
00059 #ifdef WIN32
00060 
00061    virtual int wrLock();
00062 
00064    virtual int rdLock();
00065 
00067    virtual int wrUnlock();
00068 
00070    virtual int rdUnlock();
00071 #endif
00072 
00073 protected:
00074 
00075 #ifdef WIN32
00076 
00077 
00078 
00079    MAKRti::DtString myName;
00080    HANDLE   readerLockoutMutex; 
00081    HANDLE   readers;        
00082    HANDLE   okToWrite;      
00083 
00084 #endif //! WIN32
00085 
00086 };
00087 
00088 #ifdef DtUSE_UTILITIES_NAMESPACE
00089 } 
00090 #endif
00091 
00092 #endif //! vlIpcRdWrLock__rti___H_
00093 
00094 #endif //! VXWORKS

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)