X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fsemaphore.h;h=b060947b57e0d0aaf661b9a04c1141f4c3f3d3dc;hp=a7cdff7371d4f301468ff42da669cea6daa5db26;hb=7292f4413397b7f2e4689f7597f4b9e73435352e;hpb=8f48ddb94a4b7981f7f88a8ec6d7c672a3c6d7bb diff --git a/source/core/semaphore.h b/source/core/semaphore.h index a7cdff7..b060947 100644 --- a/source/core/semaphore.h +++ b/source/core/semaphore.h @@ -17,10 +17,9 @@ class Semaphore public: #ifndef WIN32 Semaphore() { pthread_cond_init(&sem, 0); } - //Mutex &get_mutex() { return mutex; } int signal() { MutexLock l(mutex); return pthread_cond_signal(&sem); } int broadcast() { MutexLock l(mutex); return pthread_cond_broadcast(&sem); } - int wait() { mutex.lock(); return pthread_cond_wait(&sem, &mutex.mutex); } + int wait() { MutexLock l(mutex); return pthread_cond_wait(&sem, &mutex.mutex); } int wait(const Time::TimeDelta &); ~Semaphore() { pthread_cond_destroy(&sem); } #else