VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlMutex.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 #ifndef VXWORKS
6 
7 
8 
9 #pragma once
10 
11 #include "vlMachineTypes.h"
12 
13 #ifdef _WIN32
14 #include <winsock2.h>
15 #include <process.h>
16 #else
17 #include <pthread.h>
18 #endif
19 
20 
21 #ifdef DtUSE_UTILITIES_NAMESPACE
22 namespace DtUSE_UTILITIES_NAMESPACE
23 {
24 #endif
25 
30 {
31 public:
32 
34  DtMutex();
35 
36 protected:
38  DtMutex(const DtMutex & orig);
40  const DtMutex & operator=(const DtMutex & orig);
41 
42 public:
44  virtual ~DtMutex();
45 
47  virtual void lock();
48 
51  virtual bool tryLock();
52 
54  virtual void unlock();
55 protected:
56 
57 #ifdef _WIN32
58  CRITICAL_SECTION myCriticalSection;
59 #else
60  pthread_mutex_t myPTMutex;
61 #endif
62 
63 };
64 
65 #ifdef DtUSE_UTILITIES_NAMESPACE
66 }
67 #endif
68 
69 
70 #endif

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)