|
|
1.1 root 1: /* 1.1.1.5 ! root 2: Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 1.1 root 3: 1.1.1.5 ! root 4: Governed by the TrueCrypt License 2.8 the full text of which is contained in ! 5: the file License.txt included in TrueCrypt binary and source code distribution ! 6: packages. 1.1 root 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 archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.