summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-03-19 17:54:00 +0000
committerstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-03-19 17:54:00 +0000
commitde84b53cdbb5340e0b0038eb562aac24342619cb (patch)
treec9ea81a0691bf519cd9538f64295fdeb25741497
parent93ed3f31bb7b39f9e2c3f04fff67138f9567310d (diff)
downloadlibapr-de84b53cdbb5340e0b0038eb562aac24342619cb.tar.gz
Rename all the "cntxt" members of the thread and proc structures to
"pool". git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63158 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/arch/beos/threadproc.h8
-rw-r--r--include/arch/netware/threadproc.h10
-rw-r--r--include/arch/os2/threadproc.h6
-rw-r--r--include/arch/unix/threadproc.h8
-rw-r--r--include/arch/win32/threadproc.h8
-rw-r--r--threadproc/beos/proc.c40
-rw-r--r--threadproc/beos/thread.c26
-rw-r--r--threadproc/beos/threadpriv.c18
-rw-r--r--threadproc/netware/proc.c38
-rw-r--r--threadproc/netware/thread.c32
-rw-r--r--threadproc/netware/threadpriv.c18
-rw-r--r--threadproc/os2/proc.c54
-rw-r--r--threadproc/os2/thread.c28
-rw-r--r--threadproc/os2/threadpriv.c18
-rw-r--r--threadproc/unix/proc.c38
-rw-r--r--threadproc/unix/thread.c34
-rw-r--r--threadproc/unix/threadpriv.c18
-rw-r--r--threadproc/win32/proc.c52
-rw-r--r--threadproc/win32/thread.c30
-rw-r--r--threadproc/win32/threadpriv.c18
20 files changed, 251 insertions, 251 deletions
diff --git a/include/arch/beos/threadproc.h b/include/arch/beos/threadproc.h
index 63cec9fb7..759fc54c7 100644
--- a/include/arch/beos/threadproc.h
+++ b/include/arch/beos/threadproc.h
@@ -78,7 +78,7 @@
#define BEOS_MAX_DATAKEYS 128
struct apr_thread_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
thread_id td;
void *data;
apr_thread_start_t func;
@@ -86,14 +86,14 @@ struct apr_thread_t {
};
struct apr_threadattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
int32 attr;
int detached;
int joinable;
};
struct apr_threadkey_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
int32 key;
};
@@ -112,7 +112,7 @@ struct beos_key {
};
struct apr_procattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
diff --git a/include/arch/netware/threadproc.h b/include/arch/netware/threadproc.h
index 5783e40ec..9323ae5bd 100644
--- a/include/arch/netware/threadproc.h
+++ b/include/arch/netware/threadproc.h
@@ -64,7 +64,7 @@
#define APR_DEFAULT_STACK_SIZE 65536
struct apr_thread_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
NXContext_t ctx;
NXThreadId_t td;
char *thread_name;
@@ -76,19 +76,19 @@ struct apr_thread_t {
};
struct apr_threadattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
size_t stack_size;
apr_int32_t detach;
char *thread_name;
};
struct apr_threadkey_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
NXKey_t key;
};
struct apr_procattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
@@ -101,7 +101,7 @@ struct apr_procattr_t {
};
//struct apr_proc_t {
-// apr_pool_t *cntxt;
+// apr_pool_t *pool;
// pid_t pid;
// apr_procattr_t *attr;
//};
diff --git a/include/arch/os2/threadproc.h b/include/arch/os2/threadproc.h
index 8419f2d6f..12db303b0 100644
--- a/include/arch/os2/threadproc.h
+++ b/include/arch/os2/threadproc.h
@@ -64,12 +64,12 @@
#define APR_THREAD_STACKSIZE 65536
struct apr_threadattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
unsigned long attr;
};
struct apr_thread_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
struct apr_threadattr_t *attr;
unsigned long tid;
apr_thread_start_t func;
@@ -83,7 +83,7 @@ struct apr_threadkey_t {
};
struct apr_procattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
diff --git a/include/arch/unix/threadproc.h b/include/arch/unix/threadproc.h
index 69f260bd6..c93c1909b 100644
--- a/include/arch/unix/threadproc.h
+++ b/include/arch/unix/threadproc.h
@@ -88,7 +88,7 @@
#if APR_HAS_THREADS
struct apr_thread_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
pthread_t *td;
void *data;
apr_thread_start_t func;
@@ -96,12 +96,12 @@ struct apr_thread_t {
};
struct apr_threadattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
pthread_attr_t *attr;
};
struct apr_threadkey_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
pthread_key_t key;
};
@@ -112,7 +112,7 @@ struct apr_thread_once_t {
#endif
struct apr_procattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
diff --git a/include/arch/win32/threadproc.h b/include/arch/win32/threadproc.h
index f18b73b60..23c795a19 100644
--- a/include/arch/win32/threadproc.h
+++ b/include/arch/win32/threadproc.h
@@ -62,7 +62,7 @@
#define SHELL_PATH "cmd.exe"
struct apr_thread_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
HANDLE td;
apr_int32_t cancel;
apr_int32_t cancel_how;
@@ -72,17 +72,17 @@ struct apr_thread_t {
};
struct apr_threadattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_int32_t detach;
};
struct apr_threadkey_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
DWORD key;
};
struct apr_procattr_t {
- apr_pool_t *cntxt;
+ apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index a34470a42..80d554892 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -61,15 +61,15 @@ struct send_pipe {
int err;
};
-APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_palloc(cont,
+ (*new) = (apr_procattr_t *)apr_palloc(pool,
sizeof(apr_procattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->parent_in = NULL;
(*new)->child_in = NULL;
(*new)->parent_out = NULL;
@@ -88,7 +88,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
apr_status_t status;
if (in != 0) {
if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (in) {
@@ -108,7 +108,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (out) {
if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (out) {
@@ -128,7 +128,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (err) {
if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (err) {
@@ -158,10 +158,10 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
getcwd(cwd, PATH_MAX);
strncat(cwd,"/\0",2);
strcat(cwd,dir);
- attr->currdir = (char *)apr_pstrdup(attr->cntxt, cwd);
+ attr->currdir = (char *)apr_pstrdup(attr->pool, cwd);
free(cwd);
} else {
- attr->currdir = (char *)apr_pstrdup(attr->cntxt, dir);
+ attr->currdir = (char *)apr_pstrdup(attr->pool, dir);
}
if (attr->currdir) {
return APR_SUCCESS;
@@ -182,7 +182,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int3
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
@@ -207,7 +207,7 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
const char * const *args,
const char * const *env,
- apr_procattr_t *attr, apr_pool_t *cont)
+ apr_procattr_t *attr, apr_pool_t *pool)
{
int i=0,nargs=0;
char **newargs = NULL;
@@ -215,7 +215,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
struct send_pipe *sp;
char * dir = NULL;
- sp = (struct send_pipe *)apr_palloc(cont, sizeof(struct send_pipe));
+ sp = (struct send_pipe *)apr_palloc(pool, sizeof(struct send_pipe));
new->in = attr->parent_in;
new->err = attr->parent_err;
@@ -343,13 +343,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_fi
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->pool);
if (child_in != NULL)
- apr_file_dup(&attr->child_in, child_in, attr->cntxt);
+ apr_file_dup(&attr->child_in, child_in, attr->pool);
if (parent_in != NULL)
- apr_file_dup(&attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup(&attr->parent_in, parent_in, attr->pool);
return APR_SUCCESS;
}
@@ -358,13 +358,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->pool);
if (child_out != NULL)
- apr_file_dup(&attr->child_out, child_out, attr->cntxt);
+ apr_file_dup(&attr->child_out, child_out, attr->pool);
if (parent_out != NULL)
- apr_file_dup(&attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup(&attr->parent_out, parent_out, attr->pool);
return APR_SUCCESS;
}
@@ -373,13 +373,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->pool);
if (child_err != NULL)
- apr_file_dup(&attr->child_err, child_err, attr->cntxt);
+ apr_file_dup(&attr->child_err, child_err, attr->pool);
if (parent_err != NULL)
- apr_file_dup(&attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup(&attr->parent_err, parent_err, attr->pool);
return APR_SUCCESS;
}
diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c
index 5b6fb4c72..12a83a296 100644
--- a/threadproc/beos/thread.c
+++ b/threadproc/beos/thread.c
@@ -55,16 +55,16 @@
#include "threadproc.h"
#include "apr_portable.h"
-APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(cont,
+ (*new) = (apr_threadattr_t *)apr_palloc(pool,
sizeof(apr_threadattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->attr = (int32)B_NORMAL_PRIORITY;
return APR_SUCCESS;
@@ -106,7 +106,7 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new, apr_threadattr_t
return APR_ENOMEM;
}
- (*new)->cntxt = pool;
+ (*new)->pool = pool;
(*new)->data = data;
(*new)->func = func;
(*new)->exitval = -1;
@@ -117,7 +117,7 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new, apr_threadattr_t
else
temp = B_NORMAL_PRIORITY;
- stat = apr_pool_create(&(*new)->cntxt, pool);
+ stat = apr_pool_create(&(*new)->pool, pool);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -144,7 +144,7 @@ int apr_os_thread_equal(apr_os_thread_t tid1, apr_os_thread_t tid2)
APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
- apr_pool_destroy(thd->cntxt);
+ apr_pool_destroy(thd->pool);
thd->exitval = retval;
exit_thread ((status_t)(retval));
/* This will never be reached... */
@@ -186,14 +186,14 @@ void apr_thread_yield()
APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
{
- return apr_pool_userdata_get(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->pool);
}
APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);
}
APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd)
@@ -203,14 +203,14 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread
}
APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*thd) == NULL) {
- (*thd) = (apr_thread_t *)apr_pcalloc(cont, sizeof(apr_thread_t));
- (*thd)->cntxt = cont;
+ (*thd) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
+ (*thd)->pool = pool;
}
(*thd)->td = *thethd;
return APR_SUCCESS;
@@ -256,4 +256,4 @@ APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
return APR_SUCCESS;
}
-APR_POOL_IMPLEMENT_ACCESSOR_X(thread, cntxt)
+APR_POOL_IMPLEMENT_ACCESSOR(thread)
diff --git a/threadproc/beos/threadpriv.c b/threadproc/beos/threadpriv.c
index 3bc1aadc3..60333868a 100644
--- a/threadproc/beos/threadpriv.c
+++ b/threadproc/beos/threadpriv.c
@@ -59,14 +59,14 @@ static struct beos_private_data *beos_data[BEOS_MAX_DATAKEYS];
static sem_id lock;
APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
- void (*dest)(void *), apr_pool_t *cont)
+ void (*dest)(void *), apr_pool_t *pool)
{
- (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
+ (*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
if ((*key) == NULL) {
return APR_ENOMEM;
}
- (*key)->cntxt = cont;
+ (*key)->pool = pool;
acquire_sem(lock);
for ((*key)->key=0; (*key)->key < BEOS_MAX_DATAKEYS; (*key)->key++){
@@ -187,14 +187,14 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_get(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
@@ -204,14 +204,14 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_t
}
APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
- apr_os_threadkey_t *thekey, apr_pool_t *cont)
+ apr_os_threadkey_t *thekey, apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*key) == NULL) {
- (*key) = (apr_threadkey_t *)apr_pcalloc(cont, sizeof(apr_threadkey_t));
- (*key)->cntxt = cont;
+ (*key) = (apr_threadkey_t *)apr_pcalloc(pool, sizeof(apr_threadkey_t));
+ (*key)->pool = pool;
}
(*key)->key = *thekey;
return APR_SUCCESS;
diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c
index 56cd25faf..d10b76f51 100644
--- a/threadproc/netware/proc.c
+++ b/threadproc/netware/proc.c
@@ -67,14 +67,14 @@ apr_status_t apr_netware_proc_cleanup(void *theproc)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new,apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new,apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_pcalloc(cont, sizeof(apr_procattr_t));
+ (*new) = (apr_procattr_t *)apr_pcalloc(pool, sizeof(apr_procattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->cmdtype = APR_PROGRAM;
return APR_SUCCESS;
@@ -86,7 +86,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
apr_status_t status;
if (in != 0) {
if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (in) {
@@ -105,7 +105,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (out) {
if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (out) {
@@ -124,7 +124,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (err) {
if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (err) {
@@ -149,13 +149,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_fi
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->pool);
if (child_in != NULL)
- apr_file_dup2(attr->child_in, child_in, attr->cntxt);
+ apr_file_dup2(attr->child_in, child_in, attr->pool);
if (parent_in != NULL)
- apr_file_dup2(attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup2(attr->parent_in, parent_in, attr->pool);
return APR_SUCCESS;
}
@@ -165,13 +165,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->pool);
if (child_out != NULL)
- apr_file_dup2(attr->child_out, child_out, attr->cntxt);
+ apr_file_dup2(attr->child_out, child_out, attr->pool);
if (parent_out != NULL)
- apr_file_dup2(attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup2(attr->parent_out, parent_out, attr->pool);
return APR_SUCCESS;
}
@@ -181,13 +181,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->pool);
if (child_err != NULL)
- apr_file_dup2(attr->child_err, child_err, attr->cntxt);
+ apr_file_dup2(attr->child_err, child_err, attr->pool);
if (parent_err != NULL)
- apr_file_dup2(attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup2(attr->parent_err, parent_err, attr->pool);
return APR_SUCCESS;
}
@@ -196,7 +196,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir)
{
- attr->currdir = apr_pstrdup(attr->cntxt, dir);
+ attr->currdir = apr_pstrdup(attr->pool, dir);
if (attr->currdir) {
return APR_SUCCESS;
}
@@ -219,7 +219,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int3
}
#if APR_HAS_FORK
-APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
@@ -291,7 +291,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
const char * const *args,
const char * const *env,
apr_procattr_t *attr,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
int i, envCount=0;
const char **newargs;
@@ -420,7 +420,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
attr->parent_err->filedes = pipe_open(attr->parent_err->fname, O_RDONLY);
}
- apr_pool_cleanup_register(cont, (void *)newproc, apr_netware_proc_cleanup,
+ apr_pool_cleanup_register(pool, (void *)newproc, apr_netware_proc_cleanup,
apr_pool_cleanup_null);
}
/*if (sysenv)
diff --git a/threadproc/netware/thread.c b/threadproc/netware/thread.c
index a9ad8c9fd..119bba9dc 100644
--- a/threadproc/netware/thread.c
+++ b/threadproc/netware/thread.c
@@ -60,16 +60,16 @@
static int thread_count = 0;
apr_status_t apr_threadattr_create(apr_threadattr_t **new,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(cont,
+ (*new) = (apr_threadattr_t *)apr_palloc(pool,
sizeof(apr_threadattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->stack_size = APR_DEFAULT_STACK_SIZE;
(*new)->detach = 0;
(*new)->thread_name = NULL;
@@ -99,7 +99,7 @@ apr_status_t apr_thread_create(apr_thread_t **new,
apr_threadattr_t *attr,
apr_thread_start_t func,
void *data,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
apr_status_t stat;
long flags = NX_THR_BIND_CONTEXT;
@@ -122,18 +122,18 @@ apr_status_t apr_thread_create(apr_thread_t **new,
stack_size = attr->stack_size;
}
- (*new) = (apr_thread_t *)apr_palloc(cont, sizeof(apr_thread_t));
+ (*new) = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->data = data;
(*new)->func = func;
- (*new)->thread_name = (char*)apr_pstrdup(cont, threadName);
+ (*new)->thread_name = (char*)apr_pstrdup(pool, threadName);
- stat = apr_pool_create(&(*new)->cntxt, cont);
+ stat = apr_pool_create(&(*new)->pool, pool);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -185,7 +185,7 @@ apr_status_t apr_thread_exit(apr_thread_t *thd,
apr_status_t retval)
{
thd->exitval = retval;
- apr_pool_destroy(thd->cntxt);
+ apr_pool_destroy(thd->pool);
NXThreadExit(NULL);
return APR_SUCCESS;
}
@@ -214,7 +214,7 @@ apr_status_t apr_thread_data_get(void **data, const char *key,
apr_thread_t *thread)
{
if (thread != NULL) {
- return apr_pool_userdata_get(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->pool);
}
else {
data = NULL;
@@ -227,7 +227,7 @@ apr_status_t apr_thread_data_set(void *data, const char *key,
apr_thread_t *thread)
{
if (thread != NULL) {
- return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);
}
else {
data = NULL;
@@ -247,14 +247,14 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd,
APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd,
apr_os_thread_t *thethd,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*thd) == NULL) {
- (*thd) = (apr_thread_t *)apr_palloc(cont, sizeof(apr_thread_t));
- (*thd)->cntxt = cont;
+ (*thd) = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
+ (*thd)->pool = pool;
}
(*thd)->td = *thethd;
return APR_SUCCESS;
@@ -272,6 +272,6 @@ APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
return APR_ENOTIMPL;
}
-APR_POOL_IMPLEMENT_ACCESSOR_X(thread, cntxt)
+APR_POOL_IMPLEMENT_ACCESSOR(thread)
diff --git a/threadproc/netware/threadpriv.c b/threadproc/netware/threadpriv.c
index 30b3b47c3..d5ff659ce 100644
--- a/threadproc/netware/threadpriv.c
+++ b/threadproc/netware/threadpriv.c
@@ -56,16 +56,16 @@
#include "threadproc.h"
apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
- void (*dest)(void *), apr_pool_t *cont)
+ void (*dest)(void *), apr_pool_t *pool)
{
apr_status_t stat;
- (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
+ (*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
if ((*key) == NULL) {
return APR_ENOMEM;
}
- (*key)->cntxt = cont;
+ (*key)->pool = pool;
if ((stat = NXKeyCreate(NULL, dest, &(*key)->key)) == 0) {
return stat;
@@ -107,14 +107,14 @@ apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
apr_status_t apr_threadkey_data_get(void **data, const char *key, apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_get(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->pool);
}
apr_status_t apr_threadkey_data_set(void *data,
const char *key, apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->pool);
}
apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,
@@ -125,14 +125,14 @@ apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,
}
apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
- apr_os_threadkey_t *thekey, apr_pool_t *cont)
+ apr_os_threadkey_t *thekey, apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*key) == NULL) {
- (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
- (*key)->cntxt = cont;
+ (*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
+ (*key)->pool = pool;
}
(*key)->key = *thekey;
return APR_SUCCESS;
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c
index 4ae5e73e9..1ef853dbd 100644
--- a/threadproc/os2/proc.c
+++ b/threadproc/os2/proc.c
@@ -72,15 +72,15 @@
#include <process.h>
#include <stdlib.h>
-APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_palloc(cont,
+ (*new) = (apr_procattr_t *)apr_palloc(pool,
sizeof(apr_procattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->parent_in = NULL;
(*new)->child_in = NULL;
(*new)->parent_out = NULL;
@@ -99,7 +99,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
apr_status_t stat;
if (in) {
if ((stat = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return stat;
}
switch (in) {
@@ -118,7 +118,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (out) {
if ((stat = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return stat;
}
switch (out) {
@@ -137,7 +137,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (err) {
if ((stat = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return stat;
}
switch (err) {
@@ -161,13 +161,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_fi
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->pool);
if (child_in != NULL)
- apr_file_dup(&attr->child_in, child_in, attr->cntxt);
+ apr_file_dup(&attr->child_in, child_in, attr->pool);
if (parent_in != NULL)
- apr_file_dup(&attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup(&attr->parent_in, parent_in, attr->pool);
return APR_SUCCESS;
}
@@ -177,13 +177,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->pool);
if (child_out != NULL)
- apr_file_dup(&attr->child_out, child_out, attr->cntxt);
+ apr_file_dup(&attr->child_out, child_out, attr->pool);
if (parent_out != NULL)
- apr_file_dup(&attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup(&attr->parent_out, parent_out, attr->pool);
return APR_SUCCESS;
}
@@ -193,13 +193,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->pool);
if (child_err != NULL)
- apr_file_dup(&attr->child_err, child_err, attr->cntxt);
+ apr_file_dup(&attr->child_err, child_err, attr->pool);
if (parent_err != NULL)
- apr_file_dup(&attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup(&attr->parent_err, parent_err, attr->pool);
return APR_SUCCESS;
}
@@ -207,7 +207,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, const char *dir)
{
- attr->currdir = apr_pstrdup(attr->cntxt, dir);
+ attr->currdir = apr_pstrdup(attr->pool, dir);
if (attr->currdir) {
return APR_SUCCESS;
}
@@ -227,7 +227,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int3
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
@@ -253,7 +253,7 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
/* quotes in the string are doubled up.
* Used to escape quotes in args passed to OS/2's cmd.exe
*/
-static char *double_quotes(apr_pool_t *cntxt, const char *str)
+static char *double_quotes(apr_pool_t *pool, const char *str)
{
int num_quotes = 0;
int len = 0;
@@ -263,7 +263,7 @@ static char *double_quotes(apr_pool_t *cntxt, const char *str)
num_quotes += str[len++] == '\"';
}
- quote_doubled_str = apr_palloc(cntxt, len + num_quotes + 1);
+ quote_doubled_str = apr_palloc(pool, len + num_quotes + 1);
dest = quote_doubled_str;
while (*str) {
@@ -281,7 +281,7 @@ static char *double_quotes(apr_pool_t *cntxt, const char *str)
APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname,
const char * const *args,
const char * const *env,
- apr_procattr_t *attr, apr_pool_t *cont)
+ apr_procattr_t *attr, apr_pool_t *pool)
{
int i, arg, numargs, cmdlen;
apr_status_t status;
@@ -351,10 +351,10 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
strcpy(interpreter, "#!" SHELL_PATH);
extra_arg = "/C";
} else if (stricmp(extension, ".exe") != 0) {
- status = apr_file_open(&progfile, progname, APR_READ|APR_BUFFERED, 0, cont);
+ status = apr_file_open(&progfile, progname, APR_READ|APR_BUFFERED, 0, pool);
if (status != APR_SUCCESS && APR_STATUS_IS_ENOENT(status)) {
- progname = apr_pstrcat(cont, progname, ".exe", NULL);
+ progname = apr_pstrcat(pool, progname, ".exe", NULL);
}
if (status == APR_SUCCESS) {
@@ -391,7 +391,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
i++;
}
- newargs = (const char **)apr_palloc(cont, sizeof (char *) * (i + 4));
+ newargs = (const char **)apr_palloc(pool, sizeof (char *) * (i + 4));
numargs = 0;
if (interpreter[0])
@@ -399,7 +399,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
if (extra_arg)
newargs[numargs++] = "/c";
- newargs[numargs++] = newprogname = apr_pstrdup(cont, progname);
+ newargs[numargs++] = newprogname = apr_pstrdup(pool, progname);
arg = 1;
while (args && args[arg]) {
@@ -417,14 +417,14 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
for (i=0; i<numargs; i++)
cmdlen += strlen(newargs[i]) + 3;
- cmdline = apr_palloc(cont, cmdlen + 2);
+ cmdline = apr_palloc(pool, cmdlen + 2);
cmdline_pos = cmdline;
for (i=0; i<numargs; i++) {
const char *a = newargs[i];
if (strpbrk(a, "&|<>\" "))
- a = apr_pstrcat(cont, "\"", double_quotes(cont, a), "\"", NULL);
+ a = apr_pstrcat(pool, "\"", double_quotes(pool, a), "\"", NULL);
if (i)
*(cmdline_pos++) = ' ';
@@ -446,7 +446,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
for (env_len=1, e=0; env[e]; e++)
env_len += strlen(env[e]) + 1;
- env_block = apr_palloc(cont, env_len);
+ env_block = apr_palloc(pool, env_len);
env_block_pos = env_block;
for (e=0; env[e]; e++) {
diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c
index 6c3e18a97..808b9938b 100644
--- a/threadproc/os2/thread.c
+++ b/threadproc/os2/thread.c
@@ -62,15 +62,15 @@
#include "fileio.h"
#include <stdlib.h>
-APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(cont, sizeof(apr_threadattr_t));
+ (*new) = (apr_threadattr_t *)apr_palloc(pool, sizeof(apr_threadattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->attr = 0;
return APR_SUCCESS;
}
@@ -102,30 +102,30 @@ static void apr_thread_begin(void *arg)
APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new, apr_threadattr_t *attr,
apr_thread_start_t func, void *data,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
apr_status_t stat;
apr_thread_t *thread;
- thread = (apr_thread_t *)apr_palloc(cont, sizeof(apr_thread_t));
+ thread = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
*new = thread;
if (thread == NULL) {
return APR_ENOMEM;
}
- thread->cntxt = cont;
+ thread->pool = pool;
thread->attr = attr;
thread->func = func;
thread->data = data;
- stat = apr_pool_create(&thread->cntxt, cont);
+ stat = apr_pool_create(&thread->pool, pool);
if (stat != APR_SUCCESS) {
return stat;
}
if (attr == NULL) {
- stat = apr_threadattr_create(&thread->attr, thread->cntxt);
+ stat = apr_threadattr_create(&thread->attr, thread->pool);
if (stat != APR_SUCCESS) {
return stat;
@@ -205,11 +205,11 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread
APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
if ((*thd) == NULL) {
- (*thd) = (apr_thread_t *)apr_pcalloc(cont, sizeof(apr_thread_t));
- (*thd)->cntxt = cont;
+ (*thd) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
+ (*thd)->pool = pool;
}
(*thd)->tid = *thethd;
return APR_SUCCESS;
@@ -226,7 +226,7 @@ int apr_os_thread_equal(apr_os_thread_t tid1, apr_os_thread_t tid2)
APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
{
- return apr_pool_userdata_get(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->pool);
}
@@ -235,10 +235,10 @@ APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);
}
-APR_POOL_IMPLEMENT_ACCESSOR_X(thread, cntxt)
+APR_POOL_IMPLEMENT_ACCESSOR(thread)
diff --git a/threadproc/os2/threadpriv.c b/threadproc/os2/threadpriv.c
index 7d1bd68e2..685268f9f 100644
--- a/threadproc/os2/threadpriv.c
+++ b/threadproc/os2/threadpriv.c
@@ -62,15 +62,15 @@
APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *),
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
+ (*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
if ((*key) == NULL) {
return APR_ENOMEM;
}
- (*key)->cntxt = cont;
+ (*key)->pool = pool;
return APR_OS2_STATUS(DosAllocThreadLocalMemory(1, &((*key)->key)));
}
@@ -94,14 +94,14 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_get(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
@@ -112,14 +112,14 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_t
APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*key) == NULL) {
- (*key) = (apr_threadkey_t *)apr_pcalloc(cont, sizeof(apr_threadkey_t));
- (*key)->cntxt = cont;
+ (*key) = (apr_threadkey_t *)apr_pcalloc(pool, sizeof(apr_threadkey_t));
+ (*key)->pool = pool;
}
(*key)->key = *thekey;
return APR_SUCCESS;
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index aa7c255a5..3c71c4e23 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -57,14 +57,14 @@
#include "apr_portable.h"
#include "apr_signal.h"
-APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_pcalloc(cont, sizeof(apr_procattr_t));
+ (*new) = (apr_procattr_t *)apr_pcalloc(pool, sizeof(apr_procattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->cmdtype = APR_PROGRAM;
return APR_SUCCESS;
}
@@ -75,7 +75,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
apr_status_t status;
if (in != 0) {
if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (in) {
@@ -94,7 +94,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (out) {
if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (out) {
@@ -113,7 +113,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t
}
if (err) {
if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
- attr->cntxt)) != APR_SUCCESS) {
+ attr->pool)) != APR_SUCCESS) {
return status;
}
switch (err) {
@@ -138,13 +138,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_fi
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->pool);
if (child_in != NULL)
- apr_file_dup2(attr->child_in, child_in, attr->cntxt);
+ apr_file_dup2(attr->child_in, child_in, attr->pool);
if (parent_in != NULL)
- apr_file_dup2(attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup2(attr->parent_in, parent_in, attr->pool);
return APR_SUCCESS;
}
@@ -154,13 +154,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->pool);
if (child_out != NULL)
- apr_file_dup2(attr->child_out, child_out, attr->cntxt);
+ apr_file_dup2(attr->child_out, child_out, attr->pool);
if (parent_out != NULL)
- apr_file_dup2(attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup2(attr->parent_out, parent_out, attr->pool);
return APR_SUCCESS;
}
@@ -170,13 +170,13 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->pool);
if (child_err != NULL)
- apr_file_dup2(attr->child_err, child_err, attr->cntxt);
+ apr_file_dup2(attr->child_err, child_err, attr->pool);
if (parent_err != NULL)
- apr_file_dup2(attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup2(attr->parent_err, parent_err, attr->pool);
return APR_SUCCESS;
}
@@ -185,7 +185,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir)
{
- attr->currdir = apr_pstrdup(attr->cntxt, dir);
+ attr->currdir = apr_pstrdup(attr->pool, dir);
if (attr->currdir) {
return APR_SUCCESS;
}
@@ -206,7 +206,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
@@ -275,7 +275,7 @@ static apr_status_t limit_proc(apr_procattr_t *attr)
APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
const char * const *args,
const char * const *env,
- apr_procattr_t *attr, apr_pool_t *cont)
+ apr_procattr_t *attr, apr_pool_t *pool)
{
int i;
const char **newargs;
@@ -352,7 +352,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
i++;
}
newargs =
- (const char **) apr_palloc(cont, sizeof (char *) * (i + 3));
+ (const char **) apr_palloc(pool, sizeof (char *) * (i + 3));
newargs[0] = SHELL_PATH;
newargs[1] = "-c";
i = 0;
diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c
index cbf5842d5..1c5df14cb 100644
--- a/threadproc/unix/thread.c
+++ b/threadproc/unix/thread.c
@@ -59,18 +59,18 @@
#if APR_HAS_THREADS
#if APR_HAVE_PTHREAD_H
-APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *pool)
{
apr_status_t stat;
- (*new) = (apr_threadattr_t *)apr_pcalloc(cont, sizeof(apr_threadattr_t));
- (*new)->attr = (pthread_attr_t *)apr_pcalloc(cont, sizeof(pthread_attr_t));
+ (*new) = (apr_threadattr_t *)apr_pcalloc(pool, sizeof(apr_threadattr_t));
+ (*new)->attr = (pthread_attr_t *)apr_pcalloc(pool, sizeof(pthread_attr_t));
if ((*new) == NULL || (*new)->attr == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
stat = pthread_attr_init((*new)->attr);
if (stat == 0) {
@@ -124,24 +124,24 @@ static void *dummy_worker(void *opaque)
APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new, apr_threadattr_t *attr,
apr_thread_start_t func, void *data,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
apr_status_t stat;
pthread_attr_t *temp;
- (*new) = (apr_thread_t *)apr_pcalloc(cont, sizeof(apr_thread_t));
+ (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->td = (pthread_t *)apr_pcalloc(cont, sizeof(pthread_t));
+ (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));
if ((*new)->td == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->data = data;
(*new)->func = func;
@@ -150,7 +150,7 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new, apr_threadattr_t
else
temp = NULL;
- stat = apr_pool_create(&(*new)->cntxt, cont);
+ stat = apr_pool_create(&(*new)->pool, pool);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -179,7 +179,7 @@ APR_DECLARE(int) apr_os_thread_equal(apr_os_thread_t tid1, apr_os_thread_t tid2)
APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
thd->exitval = retval;
- apr_pool_destroy(thd->cntxt);
+ apr_pool_destroy(thd->pool);
pthread_exit(NULL);
return APR_SUCCESS;
}
@@ -226,14 +226,14 @@ void apr_thread_yield()
APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
{
- return apr_pool_userdata_get(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->pool);
}
APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);
}
APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd)
@@ -243,14 +243,14 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread
}
APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*thd) == NULL) {
- (*thd) = (apr_thread_t *)apr_pcalloc(cont, sizeof(apr_thread_t));
- (*thd)->cntxt = cont;
+ (*thd) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
+ (*thd)->pool = pool;
}
(*thd)->td = thethd;
return APR_SUCCESS;
@@ -272,7 +272,7 @@ APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
return pthread_once(&control->once, func);
}
-APR_POOL_IMPLEMENT_ACCESSOR_X(thread, cntxt)
+APR_POOL_IMPLEMENT_ACCESSOR(thread)
#endif /* HAVE_PTHREAD_H */
#endif /* APR_HAS_THREADS */
diff --git a/threadproc/unix/threadpriv.c b/threadproc/unix/threadpriv.c
index c220b4f86..2e11bfcb7 100644
--- a/threadproc/unix/threadpriv.c
+++ b/threadproc/unix/threadpriv.c
@@ -60,15 +60,15 @@
#if APR_HAVE_PTHREAD_H
APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
- void (*dest)(void *), apr_pool_t *cont)
+ void (*dest)(void *), apr_pool_t *pool)
{
- (*key) = (apr_threadkey_t *)apr_pcalloc(cont, sizeof(apr_threadkey_t));
+ (*key) = (apr_threadkey_t *)apr_pcalloc(pool, sizeof(apr_threadkey_t));
if ((*key) == NULL) {
return APR_ENOMEM;
}
- (*key)->cntxt = cont;
+ (*key)->pool = pool;
return pthread_key_create(&(*key)->key, dest);
@@ -110,14 +110,14 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_get(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
@@ -127,14 +127,14 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_t
}
APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
- apr_os_threadkey_t *thekey, apr_pool_t *cont)
+ apr_os_threadkey_t *thekey, apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*key) == NULL) {
- (*key) = (apr_threadkey_t *)apr_pcalloc(cont, sizeof(apr_threadkey_t));
- (*key)->cntxt = cont;
+ (*key) = (apr_threadkey_t *)apr_pcalloc(pool, sizeof(apr_threadkey_t));
+ (*key)->pool = pool;
}
(*key)->key = *thekey;
return APR_SUCCESS;
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index f90400a49..c67958ba3 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -72,17 +72,17 @@
*/
APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_pcalloc(cont, sizeof(apr_procattr_t));
- (*new)->cntxt = cont;
+ (*new) = (apr_procattr_t *)apr_pcalloc(pool, sizeof(apr_procattr_t));
+ (*new)->pool = pool;
(*new)->cmdtype = APR_PROGRAM;
return APR_SUCCESS;
}
static apr_status_t open_nt_process_pipe(apr_file_t **read, apr_file_t **write,
apr_int32_t iBlockingMode,
- apr_pool_t *cntxt)
+ apr_pool_t *pool)
{
apr_status_t stat;
BOOLEAN bAsyncRead, bAsyncWrite;
@@ -104,7 +104,7 @@ static apr_status_t open_nt_process_pipe(apr_file_t **read, apr_file_t **write,
bAsyncWrite = TRUE;
}
if ((stat = apr_create_nt_pipe(read, write, bAsyncRead, bAsyncWrite,
- cntxt)) != APR_SUCCESS)
+ pool)) != APR_SUCCESS)
return stat;
return APR_SUCCESS;
@@ -164,7 +164,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if (in) {
stat = open_nt_process_pipe(&attr->child_in, &attr->parent_in, in,
- attr->cntxt);
+ attr->pool);
if (stat == APR_SUCCESS)
stat = make_handle_private(attr->parent_in);
if (stat != APR_SUCCESS)
@@ -172,7 +172,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
}
if (out) {
stat = open_nt_process_pipe(&attr->parent_out, &attr->child_out, out,
- attr->cntxt);
+ attr->pool);
if (stat == APR_SUCCESS)
stat = make_handle_private(attr->parent_out);
if (stat != APR_SUCCESS)
@@ -180,7 +180,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
}
if (err) {
stat = open_nt_process_pipe(&attr->parent_err, &attr->child_err, err,
- attr->cntxt);
+ attr->pool);
if (stat == APR_SUCCESS)
stat = make_handle_private(attr->parent_err);
if (stat != APR_SUCCESS)
@@ -198,7 +198,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr,
if (attr->child_in == NULL && attr->parent_in == NULL) {
stat = open_nt_process_pipe(&attr->child_in, &attr->parent_in,
APR_FULL_BLOCK,
- attr->cntxt);
+ attr->pool);
if (stat == APR_SUCCESS)
stat = make_handle_private(attr->parent_in);
if (stat != APR_SUCCESS)
@@ -221,7 +221,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr,
if (attr->child_out == NULL && attr->parent_out == NULL) {
stat = open_nt_process_pipe(&attr->child_out, &attr->parent_out,
APR_FULL_BLOCK,
- attr->cntxt);
+ attr->pool);
if (stat == APR_SUCCESS)
stat = make_handle_private(attr->parent_out);
if (stat != APR_SUCCESS)
@@ -244,7 +244,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr,
if (attr->child_err == NULL && attr->parent_err == NULL) {
stat = open_nt_process_pipe(&attr->child_err, &attr->parent_err,
APR_FULL_BLOCK,
- attr->cntxt);
+ attr->pool);
if (stat == APR_SUCCESS)
stat = make_handle_private(attr->parent_err);
if (stat != APR_SUCCESS)
@@ -265,7 +265,7 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
* the NT library loading code that flunk the '/' parsing test.
*/
return apr_filepath_merge(&attr->currdir, NULL, dir,
- APR_FILEPATH_NATIVE, attr->cntxt);
+ APR_FILEPATH_NATIVE, attr->pool);
}
APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
@@ -287,7 +287,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
const char * const *args,
const char * const *env,
apr_procattr_t *attr,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
apr_status_t rv;
apr_size_t i;
@@ -321,7 +321,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* a 16 bit app running in the VDM or WOW context.
*/
if (progname[0] == '\"') {
- progname = apr_pstrndup(cont, progname + 1, strlen(progname) - 2);
+ progname = apr_pstrndup(pool, progname + 1, strlen(progname) - 2);
}
/* progname must be unquoted, in native format, as there are all sorts
@@ -330,16 +330,16 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* so we've casted past the constness issue.
*/
if (strchr(progname, ' '))
- cmdline = apr_pstrcat(cont, "\"", progname, "\"", NULL);
+ cmdline = apr_pstrcat(pool, "\"", progname, "\"", NULL);
else
cmdline = (char*)progname;
i = 1;
while (args && args[i]) {
if (strchr(args[i], ' '))
- cmdline = apr_pstrcat(cont, cmdline, " \"", args[i], "\"", NULL);
+ cmdline = apr_pstrcat(pool, cmdline, " \"", args[i], "\"", NULL);
else
- cmdline = apr_pstrcat(cont, cmdline, " ", args[i], NULL);
+ cmdline = apr_pstrcat(pool, cmdline, " ", args[i], NULL);
i++;
}
@@ -350,10 +350,10 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
if (!shellcmd)
shellcmd = SHELL_PATH;
if (shellcmd[0] == '"')
- progname = apr_pstrndup(cont, shellcmd + 1, strlen(shellcmd) - 1);
+ progname = apr_pstrndup(pool, shellcmd + 1, strlen(shellcmd) - 1);
else if (strchr(shellcmd, ' '))
- shellcmd = apr_pstrcat(cont, "\"", shellcmd, "\"", NULL);
- cmdline = apr_pstrcat(cont, shellcmd, " /C \"", cmdline, "\"", NULL);
+ shellcmd = apr_pstrcat(pool, "\"", shellcmd, "\"", NULL);
+ cmdline = apr_pstrcat(pool, shellcmd, " /C \"", cmdline, "\"", NULL);
}
else {
/* Win32 is _different_ than unix. While unix will find the given
@@ -364,7 +364,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
*/
char *progpath;
apr_filepath_merge(&progpath, attr->currdir, progname,
- APR_FILEPATH_NATIVE, cont);
+ APR_FILEPATH_NATIVE, pool);
progname = progpath;
}
@@ -391,7 +391,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t *pNext;
- pEnvBlock = (char *)apr_palloc(cont, iEnvBlockLen * 2);
+ pEnvBlock = (char *)apr_palloc(pool, iEnvBlockLen * 2);
dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
i = 0;
@@ -415,7 +415,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
ELSE_WIN_OS_IS_ANSI
{
char *pNext;
- pEnvBlock = (char *)apr_palloc(cont, iEnvBlockLen);
+ pEnvBlock = (char *)apr_palloc(pool, iEnvBlockLen);
i = 0;
pNext = pEnvBlock;
@@ -437,9 +437,9 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
STARTUPINFOW si;
apr_size_t nprg = strlen(progname) + 1;
apr_size_t nwprg = nprg + 6;
- apr_wchar_t *wprg = apr_palloc(cont, nwprg * sizeof(wprg[0]));
+ apr_wchar_t *wprg = apr_palloc(pool, nwprg * sizeof(wprg[0]));
apr_size_t ncmd = strlen(cmdline) + 1, nwcmd = ncmd;
- apr_wchar_t *wcmd = apr_palloc(cont, nwcmd * sizeof(wcmd[0]));
+ apr_wchar_t *wcmd = apr_palloc(pool, nwcmd * sizeof(wcmd[0]));
apr_size_t ncwd = 0, nwcwd = 0;
apr_wchar_t *wcwd = NULL;
@@ -453,7 +453,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
if (attr->currdir)
{
ncwd = nwcwd = strlen(attr->currdir) + 1;
- wcwd = apr_palloc(cont, ncwd * sizeof(wcwd[0]));
+ wcwd = apr_palloc(pool, ncwd * sizeof(wcwd[0]));
if ((rv = apr_conv_utf8_to_ucs2(attr->currdir, &ncwd,
wcwd, &nwcwd))
!= APR_SUCCESS) {
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 14ba8a388..da7b5a721 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -64,16 +64,16 @@
#include "misc.h"
APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(cont,
+ (*new) = (apr_threadattr_t *)apr_palloc(pool,
sizeof(apr_threadattr_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
return APR_SUCCESS;
}
@@ -100,22 +100,22 @@ static void *dummy_worker(void *opaque)
APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
apr_threadattr_t *attr,
apr_thread_start_t func,
- void *data, apr_pool_t *cont)
+ void *data, apr_pool_t *pool)
{
apr_status_t stat;
unsigned temp;
- (*new) = (apr_thread_t *)apr_palloc(cont, sizeof(apr_thread_t));
+ (*new) = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
if ((*new) == NULL) {
return APR_ENOMEM;
}
- (*new)->cntxt = cont;
+ (*new)->pool = pool;
(*new)->data = data;
(*new)->func = func;
- stat = apr_pool_create(&(*new)->cntxt, cont);
+ stat = apr_pool_create(&(*new)->pool, pool);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -147,7 +147,7 @@ APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
apr_status_t retval)
{
thd->exitval = retval;
- apr_pool_destroy(thd->cntxt);
+ apr_pool_destroy(thd->pool);
#ifndef _WIN32_WCE
_endthreadex(0);
#else
@@ -197,14 +197,14 @@ APR_DECLARE(void) apr_thread_yield()
APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key,
apr_thread_t *thread)
{
- return apr_pool_userdata_get(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->pool);
}
APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);
}
APR_DECLARE(apr_os_thread_t) apr_os_thread_current(void)
@@ -224,14 +224,14 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd,
APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd,
apr_os_thread_t *thethd,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*thd) == NULL) {
- (*thd) = (apr_thread_t *)apr_palloc(cont, sizeof(apr_thread_t));
- (*thd)->cntxt = cont;
+ (*thd) = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
+ (*thd)->pool = pool;
}
(*thd)->td = thethd;
return APR_SUCCESS;
@@ -253,4 +253,4 @@ APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
return APR_SUCCESS;
}
-APR_POOL_IMPLEMENT_ACCESSOR_X(thread, cntxt)
+APR_POOL_IMPLEMENT_ACCESSOR(thread)
diff --git a/threadproc/win32/threadpriv.c b/threadproc/win32/threadpriv.c
index ad438c28a..9d9a88a37 100644
--- a/threadproc/win32/threadpriv.c
+++ b/threadproc/win32/threadpriv.c
@@ -61,14 +61,14 @@
APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *),
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
+ (*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
if ((*key) == NULL) {
return APR_ENOMEM;
}
- (*key)->cntxt = cont;
+ (*key)->pool = pool;
if (((*key)->key = TlsAlloc()) != 0xFFFFFFFF) {
return APR_SUCCESS;
@@ -105,14 +105,14 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_get(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup)(void *),
apr_threadkey_t *threadkey)
{
- return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->pool);
}
APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,
@@ -124,14 +124,14 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,
APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey,
- apr_pool_t *cont)
+ apr_pool_t *pool)
{
- if (cont == NULL) {
+ if (pool == NULL) {
return APR_ENOPOOL;
}
if ((*key) == NULL) {
- (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
- (*key)->cntxt = cont;
+ (*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
+ (*key)->pool = pool;
}
(*key)->key = *thekey;
return APR_SUCCESS;