]> git.tdb.fi Git - libs/core.git/blob - source/core/semaphore.h
3f2cc974a455855c35246f7abc10d12d1993e709
[libs/core.git] / source / core / semaphore.h
1 /* $Id$
2
3 This file is part of libmspcore
4 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_CORE_SEMAPHORE_H_
9 #define MSP_CORE_SEMAPHORE_H_
10
11 #include "mutex.h"
12 #include "../time/timedelta.h"
13
14 namespace Msp {
15
16 class Semaphore
17 {
18 private:
19         struct Private;
20
21         Private *priv;
22
23 public:
24         Semaphore(unsigned);
25         ~Semaphore();
26
27         void signal();
28         void wait();
29         bool wait(const Time::TimeDelta &);
30 };
31
32 }
33
34 #endif