summaryrefslogtreecommitdiff
path: root/locks/unix/locks.c
diff options
context:
space:
mode:
Diffstat (limited to 'locks/unix/locks.c')
-rw-r--r--locks/unix/locks.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/locks/unix/locks.c b/locks/unix/locks.c
index 44bbd20ce..40a4718a4 100644
--- a/locks/unix/locks.c
+++ b/locks/unix/locks.c
@@ -108,16 +108,17 @@ static apr_status_t create_lock(apr_lock_t *new, const char *fname)
apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type,
apr_lockscope_e scope, const char *fname,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
apr_lock_t *new;
apr_status_t stat;
- new = (apr_lock_t *)apr_pcalloc(cont, sizeof(apr_lock_t));
+ new = (apr_lock_t *)apr_pcalloc(pool, sizeof(apr_lock_t));
- new->cntxt = cont;
+ new->pool = pool;
new->type = type;
new->scope = scope;
+
if ((stat = create_lock(new, fname)) != APR_SUCCESS)
return APR_SUCCESS;
@@ -135,9 +136,9 @@ apr_status_t apr_lock_sms_create(apr_lock_t **lock, apr_locktype_e type,
new = (apr_lock_t *)apr_sms_calloc(mem_sys, sizeof(apr_lock_t));
new->mem_sys = mem_sys;
- new->cntxt = NULL;
- new->type = type;
- new->scope = scope;
+ new->type = type;
+ new->scope = scope;
+
if ((stat = create_lock(new, fname)) != APR_SUCCESS)
return stat;
@@ -299,13 +300,13 @@ apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname,
apr_status_t apr_lock_data_get(apr_lock_t *lock, const char *key, void *data)
{
- return apr_pool_userdata_get(data, key, lock->cntxt);
+ return apr_pool_userdata_get(data, key, lock->pool);
}
apr_status_t apr_lock_data_set(apr_lock_t *lock, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_pool_userdata_set(data, key, cleanup, lock->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, lock->pool);
}
apr_status_t apr_os_lock_get(apr_os_lock_t *oslock, apr_lock_t *lock)
@@ -321,14 +322,14 @@ apr_status_t apr_os_lock_get(apr_os_lock_t *oslock, apr_lock_t *lock)
}
apr_status_t apr_os_lock_put(apr_lock_t **lock, apr_os_lock_t *thelock,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
if (cont == NULL) {
return APR_ENOPOOL;
}
if ((*lock) == NULL) {
- (*lock) = (apr_lock_t *)apr_pcalloc(cont, sizeof(apr_lock_t));
- (*lock)->cntxt = cont;
+ (*lock) = (apr_lock_t *)apr_pcalloc(pool, sizeof(apr_lock_t));
+ (*lock)->pool = pool;
}
(*lock)->interproc = thelock->crossproc;
#if APR_HAS_THREADS