diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llapr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp index 82530b1..669afc5 100644 --- a/linden/indra/llcommon/llapr.cpp +++ b/linden/indra/llcommon/llapr.cpp | |||
@@ -38,6 +38,7 @@ | |||
38 | apr_pool_t *gAPRPoolp = NULL; // Global APR memory pool | 38 | apr_pool_t *gAPRPoolp = NULL; // Global APR memory pool |
39 | LLVolatileAPRPool *LLAPRFile::sAPRFilePoolp = NULL ; //global volatile APR memory pool. | 39 | LLVolatileAPRPool *LLAPRFile::sAPRFilePoolp = NULL ; //global volatile APR memory pool. |
40 | apr_thread_mutex_t *gLogMutexp = NULL; | 40 | apr_thread_mutex_t *gLogMutexp = NULL; |
41 | apr_thread_mutex_t *gCallStacksLogMutexp = NULL; | ||
41 | 42 | ||
42 | const S32 FULL_VOLATILE_APR_POOL = 1024 ; //number of references to LLVolatileAPRPool | 43 | const S32 FULL_VOLATILE_APR_POOL = 1024 ; //number of references to LLVolatileAPRPool |
43 | 44 | ||
@@ -51,6 +52,7 @@ void ll_init_apr() | |||
51 | 52 | ||
52 | // Initialize the logging mutex | 53 | // Initialize the logging mutex |
53 | apr_thread_mutex_create(&gLogMutexp, APR_THREAD_MUTEX_UNNESTED, gAPRPoolp); | 54 | apr_thread_mutex_create(&gLogMutexp, APR_THREAD_MUTEX_UNNESTED, gAPRPoolp); |
55 | apr_thread_mutex_create(&gCallStacksLogMutexp, APR_THREAD_MUTEX_UNNESTED, gAPRPoolp); | ||
54 | } | 56 | } |
55 | 57 | ||
56 | if(!LLAPRFile::sAPRFilePoolp) | 58 | if(!LLAPRFile::sAPRFilePoolp) |
@@ -72,6 +74,14 @@ void ll_cleanup_apr() | |||
72 | apr_thread_mutex_destroy(gLogMutexp); | 74 | apr_thread_mutex_destroy(gLogMutexp); |
73 | gLogMutexp = NULL; | 75 | gLogMutexp = NULL; |
74 | } | 76 | } |
77 | if (gCallStacksLogMutexp) | ||
78 | { | ||
79 | // Clean up the logging mutex | ||
80 | |||
81 | // All other threads NEED to be done before we clean up APR, so this is okay. | ||
82 | apr_thread_mutex_destroy(gCallStacksLogMutexp); | ||
83 | gCallStacksLogMutexp = NULL; | ||
84 | } | ||
75 | if (gAPRPoolp) | 85 | if (gAPRPoolp) |
76 | { | 86 | { |
77 | apr_pool_destroy(gAPRPoolp); | 87 | apr_pool_destroy(gAPRPoolp); |