32#ifndef _QORE_SMARTMUTEX
34#define _QORE_SMARTMUTEX
37#include <qore/AbstractSmartLock.h>
38#include <qore/QoreCondition.h>
45class SmartMutex :
public AbstractSmartLock {
47 DLLEXPORT
virtual int releaseImpl();
48 DLLEXPORT
virtual int grabImpl(
int mtid, VLock *nvl, ExceptionSink *xsink,
int64 timeout_ms = 0);
49 DLLEXPORT
virtual int releaseImpl(ExceptionSink *xsink);
50 DLLEXPORT
virtual int tryGrabImpl(
int mtid, VLock *nvl);
51 DLLEXPORT
virtual int externWaitImpl(
int mtid, QoreCondition *cond, ExceptionSink *xsink,
int64 timeout = 0);
52 DLLEXPORT
virtual void destructorImpl(ExceptionSink *xsink);
55 DLLEXPORT SmartMutex() {}
56 DLLEXPORT
virtual ~SmartMutex();
58 DLLEXPORT
bool owns_lock();
59 DLLEXPORT
virtual const char* getName()
const {
return "Mutex"; }
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition common.h:266