diff options
author | striker <striker@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-19 17:54:00 +0000 |
---|---|---|
committer | striker <striker@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-19 17:54:00 +0000 |
commit | de84b53cdbb5340e0b0038eb562aac24342619cb (patch) | |
tree | c9ea81a0691bf519cd9538f64295fdeb25741497 /threadproc/unix | |
parent | 93ed3f31bb7b39f9e2c3f04fff67138f9567310d (diff) | |
download | libapr-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
Diffstat (limited to 'threadproc/unix')
-rw-r--r-- | threadproc/unix/proc.c | 38 | ||||
-rw-r--r-- | threadproc/unix/thread.c | 34 | ||||
-rw-r--r-- | threadproc/unix/threadpriv.c | 18 |
3 files changed, 45 insertions, 45 deletions
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; |