diff options
| author | Oz Linden <oz@lindenlab.com> | 2013-03-18 14:30:57 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2013-03-18 14:30:57 -0400 |
| commit | ed7785bf97a601448ba2da5fb2f19ea2861454c5 (patch) | |
| tree | 17e8d9ccf28ae30c5029ecea7e0ab8bed0fe3926 /indra/llcommon/llthread.h | |
| parent | c8533650b4779040c5e196f9ff156e3454edc9c8 (diff) | |
| parent | bf95c1cae7a84d1a97dacd8ea7f1b6af8be067a9 (diff) | |
merge up to 3.5.0-beta3 (chui)
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 |
