| 26 | namespace util |
| 27 | { |
| 28 | class Event |
| 29 | { |
| 30 | public: |
| 31 | |
| 32 | Event(void); |
| 33 | ~Event(void); |
| 34 | void wait(void); |
| 35 | void signal(void); |
| 36 | bool isLocked(void); |
| 37 | |
| 38 | private: |
| 39 | |
| 40 | #ifdef _WIN32 |
| 41 | HANDLE event; |
| 42 | #else |
| 43 | pthread_mutex_t mutex; |
| 44 | pthread_cond_t cond; |
| 45 | bool ready, deadYet; |
| 46 | #endif |
| 47 | }; |
| 48 | |
| 49 | |
| 50 | // Critical section (recursive mutex) |
nothing calls this directly
no outgoing calls
no test coverage detected