#ifndef __J2K__Semaphore_HPP__ #define __J2K__Semaphore_HPP__ #include #include class Semaphore { private: Mutex m; SCHAR state; char* name; int color; int fg; public: Semaphore( SCHAR init = 0, const char* sem_name = " ", int c = 7 ); inline virtual ~Semaphore() { } void P(); void V(); SCHAR get(); void set( SCHAR value ); // Not implemented. private: inline Semaphore( const Semaphore& src ); inline const Semaphore& operator=( const Semaphore& src ); }; #endif