Update README.md
[nemesis.git] / Platform / SyncEvent.h
1 /*
2  Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
3
4  Governed by the TrueCrypt License 3.0 the full text of which is contained in
5  the file License.txt included in TrueCrypt binary and source code distribution
6  packages.
7 */
8
9 #ifndef TC_HEADER_Platform_SyncEvent
10 #define TC_HEADER_Platform_SyncEvent
11
12 #ifdef TC_WINDOWS
13 #       include "System.h"
14 #else
15 #       include <pthread.h>
16 #endif
17 #include "PlatformBase.h"
18 #include "Mutex.h"
19
20 namespace TrueCrypt
21 {
22         class SyncEvent
23         {
24         public:
25                 SyncEvent ();
26                 ~SyncEvent ();
27
28                 void Signal ();
29                 void Wait ();
30
31         protected:
32                 bool Initialized;
33 #ifdef TC_WINDOWS
34                 HANDLE SystemSyncEvent;
35 #else
36                 volatile bool Signaled;
37                 pthread_cond_t SystemSyncEvent;
38                 Mutex EventMutex;
39 #endif
40
41         private:
42                 SyncEvent (const SyncEvent &);
43                 SyncEvent &operator= (const SyncEvent &);
44         };
45 }
46
47 #endif // TC_HEADER_Platform_SyncEvent
This page took 0.020917 seconds and 3 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.