34 #ifndef _QORE_VRMUTEX_H 36 #define _QORE_VRMUTEX_H 38 #include "qore/intern/AbstractSmartLock.h" 39 #include "qore/intern/VLock.h" 42 class VRMutex :
public AbstractSmartLock {
46 DLLLOCAL
virtual int releaseImpl();
48 DLLLOCAL
virtual int grabImpl(
int mtid, VLock *nvl,
ExceptionSink *xsink,
int64 timeout_ms = 0);
49 DLLLOCAL
virtual int tryGrabImpl(
int mtid, VLock *nvl);
50 DLLLOCAL
virtual void cleanupImpl();
61 DLLLOCAL
virtual const char* getName()
const {
return "VRMutex"; }
63 DLLLOCAL
int get_count()
const {
68 class VRMutexOptionalLockHelper {
73 DLLLOCAL VRMutexOptionalLockHelper(VRMutex* vm,
ExceptionSink* xsink) : m(vm && vm->enter(xsink) >= 0 ? vm : 0) {
77 DLLLOCAL ~VRMutexOptionalLockHelper() {
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:46
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