X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fsemaphore.h;h=e6c09c54437e57ed3ae0cf8903a30c920c976760;hb=6a38983c19fe78753962288e206c5817ad595448;hp=c55553a6f31d9ffd02b23040621ebb87337feff0;hpb=521cf1db00f8ce2d9f9494dca503d6c17d89ac2f;p=libs%2Fcore.git diff --git a/source/core/semaphore.h b/source/core/semaphore.h index c55553a..e6c09c5 100644 --- a/source/core/semaphore.h +++ b/source/core/semaphore.h @@ -4,6 +4,7 @@ This file is part of libmspcore Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ + #ifndef MSP_CORE_SEMAPHORE_H_ #define MSP_CORE_SEMAPHORE_H_ @@ -15,15 +16,6 @@ namespace Msp { class Semaphore { -public: - Semaphore(); - Semaphore(Mutex &); - int signal(); - int broadcast(); - int wait(); - int wait(const Time::TimeDelta &); - Mutex &get_mutex() { return *mutex; } - ~Semaphore(); private: Mutex *mutex; bool own_mutex; @@ -32,7 +24,19 @@ private: unsigned count; #endif +public: + Semaphore(); + Semaphore(Mutex &); +private: void init(); +public: + ~Semaphore(); + + int signal(); + int broadcast(); + int wait(); + int wait(const Time::TimeDelta &); + Mutex &get_mutex() { return *mutex; } }; #ifndef WIN32