25 #if defined(LINUX) || defined(MBSD)
26 #define HAVE_PLATFORM_LOCK
29 #define HAVE_PLATFORM_LOCK
32 #ifdef HAVE_PLATFORM_LOCK
44 explicit UT_Lock(
bool initially_locked =
false);
53 #if defined(WIN32) || defined(DEBUG_LOCK_CALLERS)
55 #elif defined(LINUX) || defined(MBSD)
58 UT_VERIFY(pthread_mutex_lock(&myLock) == 0);
67 bool safeLock() { lock();
return true; }
73 #if defined(LINUX) || defined(MBSD)
80 #if (UT_ASSERT_LEVEL > UT_ASSERT_LEVEL_NONE)
81 int result = pthread_mutex_unlock(&myLock);
84 (
void) pthread_mutex_unlock(&myLock);
92 int getCollisions() {
return 0; }
94 int64 getMemoryUsage(
bool inclusive)
const;
100 #if defined(LINUX) || defined(MBSD)
101 pthread_mutex_t myLock;
102 pthread_mutexattr_t myLockAttributes;
111 void sleep(
void *cond_var);
114 bool sleepMS(
void *cond_var,
int64 timeout_ms);
119 #if defined(DEBUG_LOCK_CALLERS)
125 #else // HAVE_PLATFORM_LOCK
UT_DebugLockType< UT_Lock > UT_DebugLock
**But if you need a result
Condition synchronization primitive.
SYS_FORCE_INLINE const X * cast(const InstancablePtr *o)
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
SYS_DECLARE_LEGACY_TR(GU_Detail)
UT_ObjLockType< UT_Lock > UT_ObjLock
UT_RecursiveSpinLock UT_Lock
UT_AutoObjLockType< UT_Lock > UT_AutoObjLock