summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadlocalstorage.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-05 19:08:35 -0700
committerRichard Linden <none@none>2013-06-05 19:08:35 -0700
commit702bd5107a71aa3ac7c779a1e2ff0eaa53161e13 (patch)
treefeca9cc804b88e4f1b78a811ae7af359c67e5455 /indra/llcommon/llthreadlocalstorage.cpp
parent6cf85d1bf3eae2d2d798b756100c048ec2b1c411 (diff)
parente1d96d72692d70f7e16fb93d6ef1d42c89d26409 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/llcommon/llthreadlocalstorage.cpp')
-rw-r--r--indra/llcommon/llthreadlocalstorage.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llcommon/llthreadlocalstorage.cpp b/indra/llcommon/llthreadlocalstorage.cpp
index 7858ee5429..32d94331a6 100644
--- a/indra/llcommon/llthreadlocalstorage.cpp
+++ b/indra/llcommon/llthreadlocalstorage.cpp
@@ -28,6 +28,7 @@
#include "linden_common.h"
#include "llthreadlocalstorage.h"
+#include "llapr.h"
//
//LLThreadLocalPointerBase
@@ -46,6 +47,21 @@ void LLThreadLocalPointerBase::set( void* value )
}
}
+void* LLThreadLocalPointerBase::get() const
+{
+ // llassert(sInitialized);
+ void* ptr;
+ apr_status_t result =
+ apr_threadkey_private_get(&ptr, mThreadKey);
+ if (result != APR_SUCCESS)
+ {
+ ll_apr_warn_status(result);
+ llerrs << "Failed to get thread local data" << llendl;
+ }
+ return ptr;
+}
+
+
void LLThreadLocalPointerBase::initStorage( )
{
apr_status_t result = apr_threadkey_private_create(&mThreadKey, NULL, gAPRPoolp);