From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_thread_sync_8h_source.html | 174 +++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 Doc/doxygen/html/_thread_sync_8h_source.html (limited to 'Doc/doxygen/html/_thread_sync_8h_source.html') diff --git a/Doc/doxygen/html/_thread_sync_8h_source.html b/Doc/doxygen/html/_thread_sync_8h_source.html new file mode 100644 index 0000000..2f44a24 --- /dev/null +++ b/Doc/doxygen/html/_thread_sync_8h_source.html @@ -0,0 +1,174 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/FoundationEx/ThreadSync.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
ThreadSync.h
+
+
+Go to the documentation of this file.
1 /* Project nGen
+
2  John DiCamillo
+
3  Copyright © 1997-2001. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: foundation
+
6  FILE: ThreadSync.h
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Declaration of the ThreadSync class
+
13 */
+
14 
+
15 #ifndef ThreadSync_h
+
16 #define ThreadSync_h
+
17 
+
18 #include <windows.h>
+
19 
+
20 // +-------------------------------------------------------------------+
+
21 
+ +
23 {
+
24 #if defined(_MT) // MULTITHREADED: WITH SYNC ------------
+
25  CRITICAL_SECTION sync;
+
26 
+
27 public:
+
28  ThreadSync() { ::InitializeCriticalSection(&sync); }
+
29  ~ThreadSync() { ::DeleteCriticalSection(&sync); }
+
30 
+
31  void acquire() { ::EnterCriticalSection(&sync); }
+
32  void release() { ::LeaveCriticalSection(&sync); }
+
33 
+
34 #else // SINGLE THREADED: NO SYNC ------------
+
35 
+
36 public:
+
37  ThreadSync() { }
+ +
39 
+
40  void acquire() { }
+
41  void release() { }
+
42 
+
43 #endif
+
44 };
+
45 
+
46 // +-------------------------------------------------------------------+
+
47 
+ +
49 {
+
50 public:
+
51  AutoThreadSync(ThreadSync& s) : sync(s) { sync.acquire(); }
+
52  ~AutoThreadSync() { sync.release(); }
+
53 private:
+
54  ThreadSync& sync;
+
55 };
+
56 
+
57 #endif ThreadSync_h
+
+
+ + + + -- cgit v1.1