-public:
-#ifndef WIN32
- Semaphore() { pthread_cond_init(&cond, 0); }
- //Mutex &get_mutex() { return mutex; }
- int signal() { MutexLock l(mutex); return pthread_cond_signal(&cond); }
- int broadcast() { MutexLock l(mutex); return pthread_cond_broadcast(&cond); }
- int wait() { mutex.lock(); return pthread_cond_wait(&cond, &mutex.mutex); }
- int wait(const Time::TimeDelta &);
- ~Semaphore() { pthread_cond_destroy(&cond); }
-#endif