#ifndef _JRD_SMP_IMPL_H_
#define _JRD_SMP_IMPL_H_

#include "../jrd/smp.h"
#include "../jrd/thd.h"

class V4Mutex : public SmpLock
{
    public:
        V4Mutex() { 
#ifdef V4_THREADING
		V4_MUTEX_INIT(&mutex); 
#endif
		}
        ~V4Mutex() { 
#ifdef V4_THREADING
		V4_MUTEX_DESTROY(&mutex); 
#endif
		}
        virtual void aquire(void) { 
#ifdef V4_THREADING
		V4_MUTEX_LOCK(&mutex); 
#endif
		}
        virtual void release(void) { 
#ifdef V4_THREADING
		V4_MUTEX_UNLOCK(&mutex); 
#endif
		}

    private:
        MUTX mutex;
};

#endif
