VR-Link API Documentation for HLA 1.3
 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 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
5 #ifndef VXWORKS
6 #pragma once
10 
11 #include "vlMachineTypes.h"
12 
13 #ifdef _WIN32
14 #define WIN32_LEAN_AND_MEAN
15 #include <Windows.h>
16 #undef WIN32_LEAN_AND_MEAN
17 #include <process.h>
18 #else
19 #include <pthread.h>
20 #endif
21 
22 
23 #ifdef DtUSE_UTILITIES_NAMESPACE
24 namespace DtUSE_UTILITIES_NAMESPACE
25 {
26 #endif
27 
32 {
33 public:
34 
36  DtMutex();
37 
38 protected:
40  DtMutex(const DtMutex & orig);
42  const DtMutex & operator=(const DtMutex & orig);
43 
44 public:
46  virtual ~DtMutex();
47 
49  virtual void lock();
50 
53  virtual bool tryLock();
54 
56  virtual void unlock();
57 protected:
58 
59 #ifdef _WIN32
60  CRITICAL_SECTION myCriticalSection;
61 #else
62  pthread_mutex_t myPTMutex;
63 #endif
64 
65 };
66 
67 #ifdef DtUSE_UTILITIES_NAMESPACE
68 }
69 #endif
70 
71 
72 #endif
instances of DtMutex are used to provide a platform independent mutual exclusion mechanism ...
Definition: vlMutex.h:31
This file contains typedefs for machine dependant types.
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)