#ifndef _SEMAPHORE_HH_ #define _SEMAPHORE_HH_ #include class Semaphore { public: Semaphore(); Semaphore( int value ); ~Semaphore(); void up() ; void bdown() ; void nbdown() ; void set( int value ) ; int get() ; private: int value; pthread_cond_t *condition; pthread_mutex_t *mutex; }; #endif /* _SEMAPHORE_HH_ */