]> git.tdb.fi Git - libs/core.git/blob - source/core/semaphore.h
61118c734febffa1e5da463e5ead628074a144ad
[libs/core.git] / source / core / semaphore.h
1 #ifndef MSP_CORE_SEMAPHORE_H_
2 #define MSP_CORE_SEMAPHORE_H_
3
4 #include <msp/time/timedelta.h>
5 #include "mutex.h"
6
7 namespace Msp {
8
9 class Semaphore
10 {
11 private:
12         struct Private;
13
14         Private *priv;
15
16 public:
17         Semaphore(unsigned);
18         ~Semaphore();
19
20         void signal();
21         void wait();
22         bool wait(const Time::TimeDelta &);
23 };
24
25 }
26
27 #endif