MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vlRdWrLock__rti__.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: vlRdWrLock__rti__.h,v $ $Revision: 1.3 $ $State: Exp $
7 *******************************************************************************/
10 
11 #ifndef VXWORKS
12 
13 #ifndef vlRdWrLock__rti___H_
14 #define vlRdWrLock__rti___H_
15 
16 #include "rtiMsConfig.h"
17 #include <vlutil/vlMachineTypes.h>
18 
19 #if WIN32
20 #include <winsock2.h>
21 #include <process.h>
22 #else
23 #include <pthread.h>
24 #endif
25 
26 #ifdef DtUSE_UTILITIES_NAMESPACE
27 namespace DtUSE_UTILITIES_NAMESPACE
28 {
29 #endif
30 
38 {
39 public:
40 
43 
44 protected:
45 
48 
50  const DtRdWrLock__rti__ & operator=(const DtRdWrLock__rti__ & orig);
51 
52 public:
54  virtual ~DtRdWrLock__rti__();
55 
57  virtual void init();
58 
60  virtual void destroy();
61 
63  virtual int wrLock();
64 
66  virtual int rdLock();
67 
70  virtual int wrUnlock();
71 
74  virtual int rdUnlock();
75 
76 protected:
77 
90  volatile long readers;
91  volatile long writers;
92 
93 #ifndef WIN32
94  pthread_rwlock_t myPtLock;
95  pthread_rwlock_t * myLock;
96 #endif
97 
98 };
99 
100 #ifdef DtUSE_UTILITIES_NAMESPACE
101 }
102 #endif
103 
104 #endif
105 
106 #endif
pthread_rwlock_t * myLock
Definition: vlRdWrLock__rti__.h:95
Platform independent read-lock / write-lock.
Definition: vlRdWrLock__rti__.h:37
pthread_rwlock_t myPtLock
Definition: vlRdWrLock__rti__.h:94
volatile long readers
The Win32 implementation uses two counters and the Interlocked Variable Access facility to create a l...
Definition: vlRdWrLock__rti__.h:90
volatile long writers
Definition: vlRdWrLock__rti__.h:91
#define DT_DLL_RTIUTIL
Definition: rtiMsConfig.h:160

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)