diff options
author | Simon Linden <simon@lindenlab.com> | 2013-03-19 16:20:53 -0700 |
---|---|---|
committer | Simon Linden <simon@lindenlab.com> | 2013-03-19 16:20:53 -0700 |
commit | d5561a1ada5cf171c8e281e910a7e989496c3705 (patch) | |
tree | 456cbb2374242d5508cc13165c876cd0672f6cd0 /indra/llcommon/llthread.h | |
parent | a8245c51b9cd6fac1d26932dbb1fcf052f00da18 (diff) | |
parent | 04e78ce4fdd3bbc0e4daa1daabbff2de1c425601 (diff) |
Merge in viewer-beta to get CHUI code
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 0d22bc863d..8c95b1c0e5 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; @@ -280,6 +281,22 @@ private: LLAtomic32< 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 |