diff options
Diffstat (limited to 'locks/netware/proc_mutex.c')
-rw-r--r-- | locks/netware/proc_mutex.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c index d5ff52201..52cd04bf9 100644 --- a/locks/netware/proc_mutex.c +++ b/locks/netware/proc_mutex.c @@ -156,6 +156,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex, apr_os_proc_mutex_t *ospmutex, apr_lockmech_e mech, + int register_cleanup, apr_pool_t *pool) { if (pool == NULL) { @@ -175,6 +176,11 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex, (*pmutex)->mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t)); (*pmutex)->mutex->mutex = *ospmutex; (*pmutex)->mutex->pool = pool; + + if (register_cleanup) { + apr_pool_cleanup_register(pool, *pmutex, apr_proc_mutex_cleanup, + apr_pool_cleanup_null); + } return APR_SUCCESS; #else return APR_ENOTIMPL; @@ -185,6 +191,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex, apr_os_proc_mutex_t *ospmutex, apr_pool_t *pool) { - return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT, pool); + return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT, + 0, pool); } |