summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acconfig.h24
-rw-r--r--include/apr_lock.h12
-rw-r--r--include/arch/beos/locks.h2
-rw-r--r--include/arch/os2/locks.h2
-rw-r--r--include/arch/unix/locks.h2
-rw-r--r--include/arch/win32/locks.h2
-rw-r--r--locks/beos/crossproc.c6
-rw-r--r--locks/beos/intraproc.c4
-rw-r--r--locks/beos/locks.c29
-rw-r--r--locks/os2/locks.c38
-rw-r--r--locks/unix/crossproc.c16
-rw-r--r--locks/unix/locks.c23
-rw-r--r--locks/win32/locks.c30
13 files changed, 96 insertions, 94 deletions
diff --git a/acconfig.h b/acconfig.h
index 35aa1f9b6..8cc5284a4 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -70,25 +70,25 @@
/* Macros to deal with using either a pool or an sms
* to do memory stuff...
*/
-#define APR_REGISTER_CLEANUP(struct, data, func, scope) \
- if (struct->cntxt) { \
- apr_pool_cleanup_register(struct->cntxt, data, func, scope); \
+#define APR_CLEANUP_REGISTER(struct, data, func, scope) \
+ if (struct->pool) { \
+ apr_pool_cleanup_register(struct->pool, data, func, scope); \
} else { \
apr_sms_cleanup_register(struct->mem_sys, APR_CHILD_CLEANUP, \
data, func); \
}
-#define APR_REMOVE_CLEANUP(struct, data, func) \
- if (struct->cntxt) { \
- apr_pool_cleanup_kill(struct->cntxt, data, func); \
+#define APR_CLEANUP_REMOVE(struct, data, func) \
+ if (struct->pool) { \
+ apr_pool_cleanup_kill(struct->pool, data, func); \
} else { \
apr_sms_cleanup_unregister(struct->mem_sys, APR_CHILD_CLEANUP, \
data, func); \
}
#define APR_MEM_PSTRDUP(struct, ptr, str) \
- if (struct->cntxt) { \
- ptr = apr_pstrdup(struct->cntxt, str); \
+ if (struct->pool) { \
+ ptr = apr_pstrdup(struct->pool, str); \
} else { \
size_t len = strlen(str) + 1; \
ptr = (char*) apr_sms_calloc(struct->mem_sys, len); \
@@ -96,15 +96,15 @@
}
#define APR_MEM_MALLOC(ptr, struct, type) \
- if (struct->cntxt) { \
- ptr = (type *)apr_palloc(struct->cntxt, sizeof(type)); \
+ if (struct->pool) { \
+ ptr = (type *)apr_palloc(struct->pool, sizeof(type)); \
} else { \
ptr = (type *)apr_sms_malloc(struct->mem_sys, sizeof(type)); \
}
#define APR_MEM_CALLOC(ptr, struct, type) \
- if (struct->cntxt) { \
- ptr = (type *)apr_pcalloc(struct->cntxt, sizeof(type)); \
+ if (struct->pool) { \
+ ptr = (type *)apr_pcalloc(struct->pool, sizeof(type)); \
} else { \
ptr = (type *)apr_sms_calloc(struct->mem_sys, sizeof(type)); \
}
diff --git a/include/apr_lock.h b/include/apr_lock.h
index 9c5e08fdf..0f495cec2 100644
--- a/include/apr_lock.h
+++ b/include/apr_lock.h
@@ -94,16 +94,16 @@ typedef enum {APR_READER, APR_WRITER} apr_readerwriter_e;
* @param fname A file name to use if the lock mechanism requires one. This
* argument should always be provided. The lock code itself will
* determine if it should be used.
- * @param cont The pool to operate on.
+ * @param pool The pool to operate on.
* @tip APR_CROSS_PROCESS may lock both processes and threads, but it is
* only guaranteed to lock processes.
- * @deffunc 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)
+ * @deffunc apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type, apr_lockscope_e scope, const char *fname, apr_pool_t *pool)
*/
APR_DECLARE(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);
/**
* Lock a protected region.
@@ -144,16 +144,16 @@ APR_DECLARE(apr_status_t) apr_lock_destroy(apr_lock_t *lock);
* argument should always be provided. The lock code itself will
* determine if it should be used. This filename should be the
* same one that was passed to apr_lock_create
- * @param cont The pool to operate on.
+ * @param pool The pool to operate on.
* @tip This function doesn't always do something, it depends on the
* locking mechanism chosen for the platform, but it is a good
* idea to call it regardless, because it makes the code more
* portable.
- * @deffunc apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname, apr_pool_t *pool)
*/
APR_DECLARE(apr_status_t) apr_lock_child_init(apr_lock_t **lock,
const char *fname,
- apr_pool_t *cont);
+ apr_pool_t *pool);
/**
* Return the pool associated with the current lock.
diff --git a/include/arch/beos/locks.h b/include/arch/beos/locks.h
index 387c536ef..39f48e319 100644
--- a/include/arch/beos/locks.h
+++ b/include/arch/beos/locks.h
@@ -63,7 +63,7 @@
#include "apr_sms.h"
struct apr_lock_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_sms_t *mem_sys;
apr_locktype_e type;
apr_lockscope_e scope;
diff --git a/include/arch/os2/locks.h b/include/arch/os2/locks.h
index d3edf99d8..09e700d00 100644
--- a/include/arch/os2/locks.h
+++ b/include/arch/os2/locks.h
@@ -60,7 +60,7 @@
#include "apr_sms.h"
struct apr_lock_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_sms_t *mem_sys;
apr_locktype_e type;
apr_lockscope_e scope;
diff --git a/include/arch/unix/locks.h b/include/arch/unix/locks.h
index e34dcc769..2a062190c 100644
--- a/include/arch/unix/locks.h
+++ b/include/arch/unix/locks.h
@@ -109,7 +109,7 @@ union semun {
#endif
struct apr_lock_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_sms_t *mem_sys;
apr_locktype_e type;
apr_lockscope_e scope;
diff --git a/include/arch/win32/locks.h b/include/arch/win32/locks.h
index 1083e685e..98cb41f95 100644
--- a/include/arch/win32/locks.h
+++ b/include/arch/win32/locks.h
@@ -59,7 +59,7 @@
#include "apr_sms.h"
struct apr_lock_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_sms_t *mem_sys;
apr_locktype_e type;
apr_lockscope_e scope;
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;
diff --git a/locks/os2/locks.c b/locks/os2/locks.c
index a0fae4b76..2056cea77 100644
--- a/locks/os2/locks.c
+++ b/locks/os2/locks.c
@@ -73,7 +73,7 @@ static apr_status_t lock_cleanup(void *thelock)
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;
ULONG rc;
@@ -84,25 +84,27 @@ 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->cntxt = cont;
- new->type = type;
- new->scope = scope;
- new->owner = 0;
+ new = (apr_lock_t *)apr_palloc(pool, sizeof(apr_lock_t));
+
+ new->pool = pool;
+ new->type = type;
+ new->scope = scope;
+ new->owner = 0;
new->lock_count = 0;
- new->fname = apr_pstrdup(cont, fname);
+ new->fname = apr_pstrdup(pool, fname);
+
DosGetInfoBlocks(&(new->tib), &ppib);
if (fname == NULL)
semname = NULL;
else
- semname = apr_pstrcat(cont, "/SEM32/", fname, NULL);
+ semname = apr_pstrcat(pool, "/SEM32/", fname, NULL);
rc = DosCreateMutexSem(semname, &(new->hMutex), scope == APR_CROSS_PROCESS ? DC_SEM_SHARED : 0, FALSE);
*lock = new;
if (!rc)
- apr_pool_cleanup_register(cont, new, lock_cleanup, apr_pool_cleanup_null);
+ apr_pool_cleanup_register(pool, new, lock_cleanup, apr_pool_cleanup_null);
return APR_OS2_STATUS(rc);
}
@@ -110,12 +112,12 @@ apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type,
apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
int rc;
PIB *ppib;
- *lock = (apr_lock_t *)apr_palloc(cont, sizeof(apr_lock_t));
+ *lock = (apr_lock_t *)apr_palloc(pool, sizeof(apr_lock_t));
if (lock == NULL)
return APR_ENOMEM;
@@ -126,7 +128,7 @@ apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname,
rc = DosOpenMutexSem( (char *)fname, &(*lock)->hMutex );
if (!rc)
- apr_pool_cleanup_register(cont, *lock, lock_cleanup, apr_pool_cleanup_null);
+ apr_pool_cleanup_register(pool, *lock, lock_cleanup, apr_pool_cleanup_null);
return APR_OS2_STATUS(rc);
}
@@ -236,14 +238,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)->hMutex = *thelock;
return APR_SUCCESS;
@@ -253,7 +255,7 @@ apr_status_t apr_os_lock_put(apr_lock_t **lock, apr_os_lock_t *thelock,
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);
}
@@ -261,5 +263,5 @@ apr_status_t apr_lock_data_get(apr_lock_t *lock, const char *key, void *data)
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);
}
diff --git a/locks/unix/crossproc.c b/locks/unix/crossproc.c
index 29df0c174..fbe33388a 100644
--- a/locks/unix/crossproc.c
+++ b/locks/unix/crossproc.c
@@ -100,7 +100,7 @@ apr_status_t apr_unix_create_inter_lock(apr_lock_t *new)
return errno;
}
new->curr_locked = 0;
- APR_REGISTER_CLEANUP(new, (void *)new, lock_cleanup, apr_pool_cleanup_null);
+ APR_CLEANUP_REGISTER(new, (void *)new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -137,7 +137,7 @@ apr_status_t apr_unix_destroy_inter_lock(apr_lock_t *lock)
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- APR_REMOVE_CLEANUP(lock, lock, lock_cleanup);
+ APR_CLEANUP_REMOVE(lock, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
@@ -223,7 +223,7 @@ apr_status_t apr_unix_create_inter_lock(apr_lock_t *new)
}
new->curr_locked = 0;
- APR_REGISTER_CLEANUP(new, (void *)new, lock_cleanup, apr_pool_cleanup_null);
+ APR_CLEANUP_REGISTER(new, (void *)new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -259,7 +259,7 @@ apr_status_t apr_unix_destroy_inter_lock(apr_lock_t *lock)
{
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- APR_REMOVE_CLEANUP(lock, lock, lock_cleanup);
+ APR_CLEANUP_REMOVE(lock, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
@@ -316,7 +316,7 @@ apr_status_t apr_unix_create_inter_lock(apr_lock_t *new)
new->curr_locked=0;
unlink(new->fname);
- APR_REGISTER_CLEANUP(new, new, lock_cleanup, apr_pool_cleanup_null);
+ APR_CLEANUP_REGISTER(new, new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -352,7 +352,7 @@ apr_status_t apr_unix_destroy_inter_lock(apr_lock_t *lock)
{
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- APR_REMOVE_CLEANUP(lock, lock, lock_cleanup);
+ APR_CLEANUP_REMOVE(lock, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
@@ -397,7 +397,7 @@ apr_status_t apr_unix_create_inter_lock(apr_lock_t *new)
return errno;
}
new->curr_locked = 0;
- APR_REGISTER_CLEANUP(new, (void *)new, lock_cleanup, apr_pool_cleanup_null);
+ APR_CLEANUP_REGISTER(new, (void *)new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -433,7 +433,7 @@ apr_status_t apr_unix_destroy_inter_lock(apr_lock_t *lock)
{
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- APR_REMOVE_CLEANUP(lock, lock, lock_cleanup);
+ APR_CLEANUP_REMOVE(lock, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
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
diff --git a/locks/win32/locks.c b/locks/win32/locks.c
index b30755dca..4920f217b 100644
--- a/locks/win32/locks.c
+++ b/locks/win32/locks.c
@@ -61,7 +61,7 @@ APR_DECLARE(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 *newlock;
SECURITY_ATTRIBUTES sec;
@@ -70,13 +70,13 @@ APR_DECLARE(apr_status_t) apr_lock_create(apr_lock_t **lock,
if (type == APR_READWRITE)
return APR_ENOTIMPL;
- newlock = (apr_lock_t *)apr_palloc(cont, sizeof(apr_lock_t));
+ newlock = (apr_lock_t *)apr_palloc(pool, sizeof(apr_lock_t));
- newlock->cntxt = cont;
- /* ToDo: How to handle the case when no context is available?
+ newlock->pool = pool;
+ /* ToDo: How to handle the case when no pool is available?
* How to cleanup the storage properly?
*/
- newlock->fname = apr_pstrdup(cont, fname);
+ newlock->fname = apr_pstrdup(pool, fname);
newlock->type = type;
newlock->scope = scope;
sec.nLength = sizeof(SECURITY_ATTRIBUTES);
@@ -112,7 +112,7 @@ APR_DECLARE(apr_status_t) apr_lock_sms_create(apr_lock_t **lock,
newlock = (apr_lock_t *)apr_sms_malloc(mem_sys, sizeof(apr_lock_t));
- newlock->cntxt = NULL;
+ newlock->pool = NULL;
newlock->mem_sys = mem_sys;
APR_MEM_PSTRDUP(newlock, newlock->fname, fname);
@@ -139,17 +139,17 @@ APR_DECLARE(apr_status_t) apr_lock_sms_create(apr_lock_t **lock,
APR_DECLARE(apr_status_t) apr_lock_child_init(apr_lock_t **lock,
const char *fname,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
/* This routine should not be called (and OpenMutex will fail if called)
* on a INTRAPROCESS lock
*/
- (*lock) = (apr_lock_t *)apr_palloc(cont, sizeof(apr_lock_t));
+ (*lock) = (apr_lock_t *)apr_palloc(pool, sizeof(apr_lock_t));
if ((*lock) == NULL) {
return APR_ENOMEM;
}
- (*lock)->fname = apr_pstrdup(cont, fname);
+ (*lock)->fname = apr_pstrdup(pool, fname);
(*lock)->mutex = OpenMutex(MUTEX_ALL_ACCESS, TRUE, fname);
if ((*lock)->mutex == NULL) {
@@ -248,14 +248,14 @@ APR_DECLARE(apr_status_t) apr_lock_destroy(apr_lock_t *lock)
APR_DECLARE(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_DECLARE(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_DECLARE(apr_status_t) apr_os_lock_get(apr_os_lock_t *thelock,
@@ -267,14 +267,14 @@ APR_DECLARE(apr_status_t) apr_os_lock_get(apr_os_lock_t *thelock,
APR_DECLARE(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_palloc(cont, sizeof(apr_lock_t));
- (*lock)->cntxt = cont;
+ (*lock) = (apr_lock_t *)apr_palloc(pool, sizeof(apr_lock_t));
+ (*lock)->pool = pool;
}
(*lock)->mutex = *thelock;
return APR_SUCCESS;