]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/semaphore.h
Make sure all files have the correct header
[libs/core.git] / source / core / semaphore.h
index c55553a6f31d9ffd02b23040621ebb87337feff0..e6c09c54437e57ed3ae0cf8903a30c920c976760 100644 (file)
@@ -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