From 62a9f557d2e91beb685843775e8f9fe73dab4b94 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 11 Jan 2013 10:16:26 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system moved thread local storage to its own cpp file --- indra/llcommon/llapr.cpp | 71 ------------------------------------------------ 1 file changed, 71 deletions(-) (limited to 'indra/llcommon/llapr.cpp') diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 0556fadb26..47fa70614f 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -493,77 +493,6 @@ S32 LLAPRFile::seek(apr_seek_where_t where, S32 offset) return LLAPRFile::seek(mFile, where, offset) ; } -// -//LLThreadLocalPointerBase -// -bool LLThreadLocalPointerBase::sInitialized = false; - -void LLThreadLocalPointerBase::set( void* value ) -{ - llassert(sInitialized && mThreadKey); - - apr_status_t result = apr_threadkey_private_set((void*)value, mThreadKey); - if (result != APR_SUCCESS) - { - ll_apr_warn_status(result); - llerrs << "Failed to set thread local data" << llendl; - } -} - -void LLThreadLocalPointerBase::initStorage( ) -{ - apr_status_t result = apr_threadkey_private_create(&mThreadKey, NULL, gAPRPoolp); - if (result != APR_SUCCESS) - { - ll_apr_warn_status(result); - llerrs << "Failed to allocate thread local data" << llendl; - } -} - -void LLThreadLocalPointerBase::destroyStorage() -{ - if (sInitialized) - { - if (mThreadKey) - { - apr_status_t result = apr_threadkey_private_delete(mThreadKey); - if (result != APR_SUCCESS) - { - ll_apr_warn_status(result); - llerrs << "Failed to delete thread local data" << llendl; - } - } - } -} - -void LLThreadLocalPointerBase::initAllThreadLocalStorage() -{ - if (!sInitialized) - { - for (LLInstanceTracker::instance_iter it = beginInstances(), end_it = endInstances(); - it != end_it; - ++it) - { - (*it).initStorage(); - } - sInitialized = true; - } -} - -void LLThreadLocalPointerBase::destroyAllThreadLocalStorage() -{ - if (sInitialized) - { - //for (LLInstanceTracker::instance_iter it = beginInstances(), end_it = endInstances(); - // it != end_it; - // ++it) - //{ - // (*it).destroyStorage(); - //} - sInitialized = false; - } -} - // //******************************************************************************************************************************* //static components of LLAPRFile -- cgit v1.2.3