diff options
author | graham linden <graham@lindenlab.com> | 2013-03-11 14:26:33 -0700 |
---|---|---|
committer | graham linden <graham@lindenlab.com> | 2013-03-11 14:26:33 -0700 |
commit | d4b3c23da11dd963915d078b169ac9ac0cf7b7bf (patch) | |
tree | 2fb1148a7593872d2599754fe0bf87204314bf6a /indra/llcommon/llthread.h | |
parent | 85af4c7b7169a0ea38aad5d3759fd36b8ff021f4 (diff) | |
parent | d348deb7049cbaef7c228000525c7ee5a265464c (diff) |
Merged lindenlab/viewer-development into default
Diffstat (limited to 'indra/llcommon/llthread.h')
-rw-r--r-- | indra/llcommon/llthread.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 5c8bbca2ca..0fb89c5613 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -30,6 +30,7 @@ #include "llapp.h" #include "llapr.h" #include "apr_thread_cond.h" +#include "boost/intrusive_ptr.hpp" class LLThread; class LLMutex; @@ -284,6 +285,22 @@ private: S32 mRef; }; +/** + * intrusive pointer support for LLThreadSafeRefCount + * this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type + */ +namespace boost +{ + inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) + { + p->ref(); + } + + inline void intrusive_ptr_release(LLThreadSafeRefCount* p) + { + p->unref(); + } +}; //============================================================================ // Simple responder for self destructing callbacks |