Guitar
event.h
Go to the documentation of this file.
1 
2 #ifndef __EVENT_H
3 #define __EVENT_H
4 
5 #include "mutex.h"
6 
7 #ifdef WIN32
8 
9 class Event {
10 private:
11  HANDLE _handle;
12 public:
13  Event();
14  ~Event();
15  bool wait(int ms = -1);
16  void signal();
17 };
18 
19 #else
20 
21 class Event {
22 private:
24  pthread_cond_t _cond;
25 public:
26  Event();
27  ~Event();
28  bool wait(int ms = -1);
29  void signal();
30 };
31 
32 #endif
33 
34 #endif
35 
36 
Event::signal
void signal()
Definition: event.cpp:66
Event::wait
bool wait(int ms=-1)
Definition: event.cpp:49
Event
Definition: event.h:21
Event::_cond
pthread_cond_t _cond
Definition: event.h:24
Mutex
Definition: mutex.h:33
event.h
Event::Event
Event()
Definition: event.cpp:39
mutex.h
Mutex::_handle
pthread_mutex_t _handle
Definition: mutex.h:35
Event::~Event
~Event()
Definition: event.cpp:44
Event::_mutex
Mutex _mutex
Definition: event.h:23