Go to the documentation of this file.
35 #ifndef _UCOMMON_ACCESS_H_
36 #define _UCOMMON_ACCESS_H_
38 #ifndef _UCOMMON_CPR_H_
59 virtual void Exlock(
void) = 0;
64 virtual void Unlock(
void) = 0;
69 inline void Lock(
void)
88 virtual void Shlock(
void) = 0;
93 virtual void Unlock(
void) = 0;
101 virtual void Share(
void);
110 virtual void Exclusive(
void);
115 inline void Lock(
void)
147 inline bool operator!()
const
148 {
return lock == NULL;};
154 inline operator bool()
const
155 {
return lock != NULL;};
195 inline bool operator!()
const
196 {
return lock == NULL;};
202 inline operator bool()
const
203 {
return lock != NULL;};
256 {
object->Exclusive();}
294 #define exclusive_object() exlock_t __autolock__ = this
295 #define protected_object() shlock_t __autolock__ = this
296 #define exclusive_access(x) exlock_t __autolock__ = &x
297 #define protected_access(x) shlock_t __autolock__ = &x