diff options
author | Dave Parks <davep@lindenlab.com> | 2011-10-14 12:38:48 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-10-14 12:38:48 -0500 |
commit | 4924f0c99b021869967f4587df703084d2bdc8ed (patch) | |
tree | ac9bcf265ddfc45cfbbd2db03ad1d17694952072 /indra/llcommon/llthread.h | |
parent | c0ca8e5e2e4d3f591db3175f09c0b64b6b2e10c5 (diff) |
b782a75c99e6 backout cleanup
Diffstat (limited to 'indra/llcommon/llthread.h')
-rw-r--r-- | indra/llcommon/llthread.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index ad4a6523a1..40291a2569 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -86,6 +86,8 @@ public: apr_pool_t *getAPRPool() { return mAPRPoolp; } LLVolatileAPRPool* getLocalAPRFilePool() { return mLocalAPRFilePoolp ; } + U32 getID() const { return mID; } + private: BOOL mPaused; @@ -101,7 +103,7 @@ protected: BOOL mIsLocalPool; EThreadStatus mStatus; U32 mID; - + //a local apr_pool for APRFile operations in this thread. If it exists, LLAPRFile::sAPRFilePoolp should not be used. //Note: this pool is used by APRFile ONLY, do NOT use it for any other purposes. // otherwise it will cause severe memory leaking!!! --bao @@ -138,17 +140,27 @@ protected: class LL_COMMON_API LLMutex { public: + typedef enum + { + NO_THREAD = 0xFFFFFFFF + } e_locking_thread; + LLMutex(apr_pool_t *apr_poolp); // NULL pool constructs a new pool for the mutex virtual ~LLMutex(); void lock(); // blocks void unlock(); bool isLocked(); // non-blocking, but does do a lock/unlock so not free + U32 lockingThread() const; //get ID of locking thread protected: apr_thread_mutex_t *mAPRMutexp; + mutable U32 mCount; + mutable U32 mLockingThread; + apr_pool_t *mAPRPoolp; BOOL mIsLocalPool; + #if MUTEX_DEBUG std::map<U32, BOOL> mIsLocked; #endif |