diff options
author | Don Kjer <don@lindenlab.com> | 2013-03-13 08:46:59 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2013-03-13 08:46:59 +0000 |
commit | 662d67e3b5f1cbf5e894f0e4af37a31faacd67e3 (patch) | |
tree | 93af533d9c1e9c027c5abc56a5de4ee207591b23 /indra/llcommon/llthread.h | |
parent | f945415210f0e18c2c6d941fda6b7d45cb0f06f1 (diff) | |
parent | 0ebcdce82bffae18459ed541f05906f625ef47e2 (diff) |
Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile failures
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 |