diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-02-27 14:48:39 -0500 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-02-27 14:48:39 -0500 |
| commit | 063edac43f90d2cb0d2b41db939bbf919a1a3217 (patch) | |
| tree | bbf1d446baef80933f6be80d05734d68144ae4cc /indra/llcommon/llthread.h | |
| parent | 6f53796ccf4dc29368920a322baeaceb3fd2266f (diff) | |
| parent | e7ab3da7a7f5c68e3544a64c30f011762572995a (diff) | |
Automated merge with file:///Users/nat/linden/viewer-leap-daggy
Diffstat (limited to 'indra/llcommon/llthread.h')
| -rw-r--r-- | indra/llcommon/llthread.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 40291a2569..b52e70ab2e 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -151,6 +151,7 @@ public: void lock(); // blocks void unlock(); bool isLocked(); // non-blocking, but does do a lock/unlock so not free + bool isSelfLocked(); //return true if locked in a same thread U32 lockingThread() const; //get ID of locking thread protected: @@ -187,11 +188,14 @@ public: LLMutexLock(LLMutex* mutex) { mMutex = mutex; - mMutex->lock(); + + if(mMutex) + mMutex->lock(); } ~LLMutexLock() { - mMutex->unlock(); + if(mMutex) + mMutex->unlock(); } private: LLMutex* mMutex; |
