From aac002b4f041a513f06b9e376a63fa2b78b07199 Mon Sep 17 00:00:00 2001 From: paulc Date: Sat, 30 Jul 2005 11:02:19 +0000 Subject: [PATCH] Decreased maximum mutex wait argument (maxwait) to long - 2400 seconds should be enough and this will increase performance and gdb's ability to show it. git-svn-id: http://yate.null.ro/svn/yate/trunk@466 acf43c95-373e-0410-b603-e72c3f656dc1 --- engine/Mutex.cpp | 8 ++++---- yateclass.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engine/Mutex.cpp b/engine/Mutex.cpp index 12390191..0fe01b17 100644 --- a/engine/Mutex.cpp +++ b/engine/Mutex.cpp @@ -54,7 +54,7 @@ public: { return m_recursive; } bool locked() const { return (m_locked > 0); } - bool lock(int64_t maxwait); + bool lock(long maxwait); void unlock(); static volatile int s_count; static volatile int s_locks; @@ -176,7 +176,7 @@ MutexPrivate::~MutexPrivate() GlobalMutex::unlock(); } -bool MutexPrivate::lock(int64_t maxwait) +bool MutexPrivate::lock(long maxwait) { bool rval = false; GlobalMutex::lock(); @@ -277,7 +277,7 @@ MutexPrivate *Mutex::privDataCopy() const return m_private; } -bool Mutex::lock(int64_t maxwait) +bool Mutex::lock(long maxwait) { return m_private ? m_private->lock(maxwait) : false; } @@ -288,7 +288,7 @@ void Mutex::unlock() m_private->unlock(); } -bool Mutex::check(int64_t maxwait) +bool Mutex::check(long maxwait) { bool ret = lock(maxwait); if (ret) diff --git a/yateclass.h b/yateclass.h index 4ad4abf2..207c2f34 100644 --- a/yateclass.h +++ b/yateclass.h @@ -2268,7 +2268,7 @@ public: * @param maxait Time in microseconds to wait for the mutex, -1 wait forever * @return True if successfully locked, false on failure */ - bool lock(int64_t maxwait = -1); + bool lock(long maxwait = -1); /** * Unlock the mutex, does never wait @@ -2287,7 +2287,7 @@ public: * @param maxait Time in microseconds to wait for the mutex, -1 wait forever * @return True if successfully locked and unlocked, false on failure */ - bool check(int64_t maxwait = -1); + bool check(long maxwait = -1); /** * Check if this mutex is recursive or not @@ -2325,7 +2325,7 @@ public: * @param mutex Reference to the mutex to lock * @param maxait Time in microseconds to wait for the mutex, -1 wait forever */ - inline Lock(Mutex& mutex, int64_t maxwait = -1) + inline Lock(Mutex& mutex, long maxwait = -1) { m_mutex = mutex.lock(maxwait) ? &mutex : 0; } /** @@ -2333,7 +2333,7 @@ public: * @param mutex Pointer to the mutex to lock * @param maxait Time in microseconds to wait for the mutex, -1 wait forever */ - inline Lock(Mutex* mutex, int64_t maxwait = -1) + inline Lock(Mutex* mutex, long maxwait = -1) { m_mutex = (mutex && mutex->lock(maxwait)) ? mutex : 0; } /**