32 #ifndef _QORE_SMARTMUTEX
34 #define _QORE_SMARTMUTEX
37 #include "qore/intern/AbstractSmartLock.h"
38 #include <qore/QoreCondition.h>
45 class SmartMutex :
public AbstractSmartLock {
47 DLLLOCAL
virtual int releaseImpl();
48 DLLLOCAL
virtual int grabImpl(
int mtid, VLock *nvl,
ExceptionSink *xsink,
int64 timeout_ms = 0);
50 DLLLOCAL
virtual int tryGrabImpl(
int mtid, VLock *nvl);
55 DLLLOCAL SmartMutex() {}
57 DLLLOCAL
virtual ~SmartMutex();
60 DLLLOCAL
bool owns_lock();
61 DLLLOCAL
virtual const char *getName()
const {
return "Mutex"; }
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
a thread condition class implementing a wrapper for pthread_cond_t
Definition: QoreCondition.h:45
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:260