summaryrefslogtreecommitdiff
path: root/memory
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2013-03-23 16:12:00 +0000
committerStefan Fritsch <sf@apache.org>2013-03-23 16:12:00 +0000
commit5c100ea811811cc92bd8fbcaedcbcf58e3c7599c (patch)
treed7528c0c5b50c11450b4d7f9d57aa60043fa7365 /memory
parentfdbb812969d7f7cfe055c1fbec8e5d40a35eaf40 (diff)
downloadapr-5c100ea811811cc92bd8fbcaedcbcf58e3c7599c.tar.gz
Add apr_pool_owner_set function to allow use of pool debugging with threads
Actually this function has been mentioned in the docs for over 10 years but has never been implemented. Also consistently destroy the thread's pool when it exits normally, not only on apr_thread_exit(). This was already done on OS2. Other platforms than unix are untested. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1460182 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r--memory/unix/apr_pools.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 5fe0701c7..b39e0cf87 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -1474,6 +1474,12 @@ static void apr_pool_check_integrity(apr_pool_t *pool)
#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_OWNER) */
}
+APR_DECLARE(void) apr_pool_owner_set(apr_pool_t *pool, apr_uint32_t flags)
+{
+#if APR_HAS_THREADS && (APR_POOL_DEBUG & APR_POOL_DEBUG_OWNER)
+ pool->owner = apr_os_thread_current();
+#endif
+}
/*
* Initialization (debug)