From e36042bb76cf2c15ed96f742eb56ba8087b798b5 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 3 Jul 2012 02:33:09 +0200 Subject: [PATCH] More that I forgot it extract from curlthreading2. --- indra/llcommon/llthread.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 33f034332..8def2c7ea 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -382,6 +382,16 @@ public: mNoHoldersCondition.signal(); // Tell waiting readers, see [5]. mNoHoldersCondition.unlock(); // Release lock on mHoldersCount. } +#if LL_DEBUG + // Really only intended for debugging purposes: + bool isLocked(void) + { + mNoHoldersCondition.lock(); + bool res = mHoldersCount; + mNoHoldersCondition.unlock(); + return res; + } +#endif }; //============================================================================