MAK RTIspy API Documentation for HLA 1.3
vlMutex__rti__.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: vlMutex__rti__.h,v $ $Revision: 1.3 $ $State: Exp $
7 *******************************************************************************/
10 
11 #ifndef VXWORKS
12 
13 #ifndef vlMutex__rti___H_
14 #define vlMutex__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 
29 #define USE_CRITSEC
30 
31 #ifdef DtUSE_UTILITIES_NAMESPACE
32 namespace DtUSE_UTILITIES_NAMESPACE
33 {
34 #endif
35 
41 {
42 public:
43 
46 
47 protected:
48 
50  DtMutex__rti__(const DtMutex__rti__ & orig);
51 
53  const DtMutex__rti__ & operator=(const DtMutex__rti__ & orig);
54 
55 public:
57  virtual ~DtMutex__rti__();
58 
61  virtual void destroy();
62 
64  virtual void lock();
65 
67  virtual void unlock();
68 
70 #ifdef WIN32
71  HANDLE mutex();
72 #else
73  pthread_mutex_t * mutex();
74 #endif
75 
76 protected:
77 
78 #ifdef WIN32
79 #ifdef USE_CRITSEC
80  CRITICAL_SECTION myCriticalSection;
81 #else
82  HANDLE myMutex;
83 #endif
84 #else
85  pthread_mutex_t myPTMutex;
86 #endif
87 
88 };
89 
90 #ifdef DtUSE_UTILITIES_NAMESPACE
91 }
92 #endif
93 
94 #endif
95 
96 #endif

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)