8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-30 18:43:03 +01:00
firebird-mirror/src/jrd/smp_impl.h

37 lines
556 B
C
Raw Normal View History

#ifndef JRD_SMP_IMPL_H
#define JRD_SMP_IMPL_H
2001-12-24 03:51:06 +01:00
#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
}
2001-12-24 03:51:06 +01:00
private:
MUTX mutex;
};
#endif // JRD_SMP_IMPL_H