add apr_pool_mutex_set() to our apr to fix thread-saftey issue

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12672 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-03-20 01:24:45 +00:00
parent bf5833650c
commit ffb1cb4f69
2 changed files with 65 additions and 14 deletions

View File

@@ -411,6 +411,17 @@ APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
*/
APR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const char *tag);
#if APR_HAS_THREADS
/**
* Add a mutex to a pool to make it suitable to use from multiple threads.
* @param pool The pool to add the mutex to
* @param mutex The mutex
* @remark The mutex does not protect the destroy operation just the low level allocs.
*/
APR_DECLARE(void) apr_pool_mutex_set(apr_pool_t *pool,
apr_thread_mutex_t *mutex);
#endif
/*
* User data management
@@ -435,6 +446,7 @@ APR_DECLARE(void) apr_pool_tag(apr_pool_t *pool, const char *tag);
* key names is a typical way to help ensure this uniqueness.
*
*/
APR_DECLARE(apr_status_t) apr_pool_userdata_set(
const void *data,
const char *key,