diff options
author | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-05 13:22:50 +0000 |
---|---|---|
committer | dreid <dreid@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-05 13:22:50 +0000 |
commit | d265a7fa4f458f3e60ea06a55501cb5c64d71437 (patch) | |
tree | 5d741727ebcfd650aa9f893122c7580666f9776c /locks/beos | |
parent | 28538df75e74d8506584bf741bb91b8e9a39b0b2 (diff) | |
download | libapr-d265a7fa4f458f3e60ea06a55501cb5c64d71437.tar.gz |
A couple of changes...
- rename the CLEANUP macros so they make more sense (I hope)
- cntxt -> pool in the lock code and macro's
No functional change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61702 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks/beos')
-rw-r--r-- | locks/beos/crossproc.c | 6 | ||||
-rw-r--r-- | locks/beos/intraproc.c | 4 | ||||
-rw-r--r-- | locks/beos/locks.c | 29 |
3 files changed, 19 insertions, 20 deletions
diff --git a/locks/beos/crossproc.c b/locks/beos/crossproc.c index 9476f5041..5e7f55425 100644 --- a/locks/beos/crossproc.c +++ b/locks/beos/crossproc.c @@ -82,7 +82,7 @@ apr_status_t create_inter_lock(apr_lock_t *new) } new->ben_interproc = 0; new->sem_interproc = stat; - APR_REGISTER_CLEANUP(new, (void *)new, lock_inter_cleanup, + APR_CLEANUP_REGISTER(new, (void *)new, lock_inter_cleanup, apr_pool_cleanup_null); return APR_SUCCESS; } @@ -117,13 +117,13 @@ apr_status_t destroy_inter_lock(apr_lock_t *lock) { apr_status_t stat; if ((stat = lock_inter_cleanup(lock)) == APR_SUCCESS) { - APR_REMOVE_CLEANUP(lock, lock, lock_inter_cleanup); + APR_CLEANUP_REMOVE(lock, lock, lock_inter_cleanup); return APR_SUCCESS; } return stat; } -apr_status_t child_init_lock(apr_lock_t **lock, apr_pool_t *cont, const char *fname) +apr_status_t child_init_lock(apr_lock_t **lock, apr_pool_t *pool, const char *fname) { return APR_SUCCESS; } diff --git a/locks/beos/intraproc.c b/locks/beos/intraproc.c index 70bc4477c..c7b57606b 100644 --- a/locks/beos/intraproc.c +++ b/locks/beos/intraproc.c @@ -77,7 +77,7 @@ apr_status_t create_intra_lock(apr_lock_t *new) } new->ben_intraproc = 0; new->sem_intraproc = stat; - APR_REGISTER_CLEANUP(new, (void *)new, lock_intra_cleanup, + APR_CLEANUP_REGISTER(new, (void *)new, lock_intra_cleanup, apr_pool_cleanup_null); return APR_SUCCESS; } @@ -112,7 +112,7 @@ apr_status_t destroy_intra_lock(apr_lock_t *lock) { apr_status_t stat; if ((stat = lock_intra_cleanup(lock)) == APR_SUCCESS) { - APR_REMOVE_CLEANUP(lock, lock, lock_intra_cleanup); + APR_CLEANUP_REMOVE(lock, lock, lock_intra_cleanup); return APR_SUCCESS; } return stat; diff --git a/locks/beos/locks.c b/locks/beos/locks.c index 58749351f..574baefd8 100644 --- a/locks/beos/locks.c +++ b/locks/beos/locks.c @@ -58,7 +58,7 @@ 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; @@ -67,12 +67,12 @@ apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type, if (type == APR_READWRITE) return APR_ENOTIMPL; - new = (apr_lock_t *)apr_palloc(cont, sizeof(apr_lock_t)); + new = (apr_lock_t *)apr_pcalloc(pool, sizeof(apr_lock_t)); if (new == NULL){ return APR_ENOMEM; } - new->cntxt = cont; + new->pool = pool; new->type = type; new->scope = scope; @@ -101,15 +101,14 @@ apr_status_t apr_lock_sms_create(apr_lock_t **lock, apr_locktype_e type, if (type == APR_READWRITE) return APR_ENOTIMPL; - new = (apr_lock_t *)apr_sms_malloc(mem_sys, sizeof(apr_lock_t)); + new = (apr_lock_t *)apr_sms_calloc(mem_sys, sizeof(apr_lock_t)); if (new == NULL){ return APR_ENOMEM; } new->mem_sys = mem_sys; - new->cntxt = NULL; - new->type = type; - new->scope = scope; + new->type = type; + new->scope = scope; if (scope != APR_CROSS_PROCESS) { if ((stat = create_intra_lock(new)) != APR_SUCCESS) { @@ -221,11 +220,11 @@ apr_status_t apr_lock_destroy(apr_lock_t *lock) } apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname, - apr_pool_t *cont) + apr_pool_t *pool) { apr_status_t stat; if ((*lock)->scope != APR_CROSS_PROCESS) { - if ((stat = child_init_lock(lock, cont, fname)) != APR_SUCCESS) { + if ((stat = child_init_lock(lock, pool, fname)) != APR_SUCCESS) { return stat; } } @@ -234,13 +233,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) @@ -253,14 +252,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) { + if (pool == 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)->sem_interproc = thelock->sem_interproc; (*lock)->ben_interproc = thelock->ben_interproc; |