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 {
52 DLLLOCAL
virtual const char* getName()
const {
return "VRMutex"; }
54 DLLLOCAL
int get_count()
const {
61 DLLLOCAL
virtual int releaseImpl();
63 DLLLOCAL
virtual int grabImpl(
int mtid, VLock *nvl,
ExceptionSink *xsink,
int64 timeout_ms = 0);
64 DLLLOCAL
virtual int tryGrabImpl(
int mtid, VLock *nvl);
65 DLLLOCAL
virtual int cleanupImpl();
68 class VRMutexOptionalLockHelper {
70 DLLLOCAL VRMutexOptionalLockHelper(VRMutex* vm,
ExceptionSink* xsink) : m(vm && vm->enter(xsink) >= 0 ? vm : 0) {
74 DLLLOCAL ~VRMutexOptionalLockHelper() {
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
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