// CritSec.h V0.1pre Provides class Crit_Sec definition
// © 2003 Elliot Nierman

 

class Crit_Sec
{

    public:

                        Crit_Sec();
                void  Enter();
                void  Leave();
                      ~Crit_Sec();
    private:

#ifdef WIN
                 CRITICAL_SECTION CSec;
#endif

#ifdef POSIX
                 pthread_mutex_t mtx;
                 pthread_mutexattr_t mtx_attr;
#endif

};