diff options
author | dougm <dougm@13f79535-47bb-0310-9956-ffa450edef68> | 2001-02-08 07:45:23 +0000 |
---|---|---|
committer | dougm <dougm@13f79535-47bb-0310-9956-ffa450edef68> | 2001-02-08 07:45:23 +0000 |
commit | aba88e6ebce8d24a8ca387c28aabc9f17559a56c (patch) | |
tree | 136752321dd3e22c22463c9ab35a700ab0507729 /threadproc | |
parent | 482ce86a79d41d751123dcfcfc29f4098135c4b7 (diff) | |
download | libapr-aba88e6ebce8d24a8ca387c28aabc9f17559a56c.tar.gz |
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61194 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/beos/proc.c | 80 | ||||
-rw-r--r-- | threadproc/beos/thread.c | 24 | ||||
-rw-r--r-- | threadproc/beos/threadpriv.c | 20 | ||||
-rw-r--r-- | threadproc/os2/proc.c | 84 | ||||
-rw-r--r-- | threadproc/os2/signals.c | 2 | ||||
-rw-r--r-- | threadproc/os2/thread.c | 12 | ||||
-rw-r--r-- | threadproc/os2/threadpriv.c | 8 | ||||
-rw-r--r-- | threadproc/unix/proc.c | 98 | ||||
-rw-r--r-- | threadproc/unix/procsup.c | 2 | ||||
-rw-r--r-- | threadproc/unix/signals.c | 2 | ||||
-rw-r--r-- | threadproc/unix/thread.c | 52 | ||||
-rw-r--r-- | threadproc/unix/threadpriv.c | 24 | ||||
-rw-r--r-- | threadproc/win32/proc.c | 30 | ||||
-rw-r--r-- | threadproc/win32/signals.c | 2 | ||||
-rw-r--r-- | threadproc/win32/thread.c | 24 | ||||
-rw-r--r-- | threadproc/win32/threadpriv.c | 20 |
16 files changed, 242 insertions, 242 deletions
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c index b15f0eb81..1b33ca06d 100644 --- a/threadproc/beos/proc.c +++ b/threadproc/beos/proc.c @@ -61,7 +61,7 @@ struct send_pipe { int err; }; -apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont) +apr_status_t apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont) { (*new) = (apr_procattr_t *)apr_palloc(cont, sizeof(apr_procattr_t)); @@ -82,12 +82,12 @@ apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont) return APR_SUCCESS; } -apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, +apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, apr_int32_t out, apr_int32_t err) { apr_status_t status; if (in != 0) { - if ((status = apr_create_pipe(&attr->child_in, &attr->parent_in, + if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt)) != APR_SUCCESS) { return status; } @@ -95,18 +95,18 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_in, 0); + apr_file_pipe_timeout_set(attr->child_in, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_in, 0); + apr_file_pipe_timeout_set(attr->parent_in, 0); break; default: - apr_set_pipe_timeout(attr->child_in, 0); - apr_set_pipe_timeout(attr->parent_in, 0); + apr_file_pipe_timeout_set(attr->child_in, 0); + apr_file_pipe_timeout_set(attr->parent_in, 0); } } if (out) { - if ((status = apr_create_pipe(&attr->parent_out, &attr->child_out, + if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out, attr->cntxt)) != APR_SUCCESS) { return status; } @@ -114,18 +114,18 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_out, 0); + apr_file_pipe_timeout_set(attr->child_out, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_out, 0); + apr_file_pipe_timeout_set(attr->parent_out, 0); break; default: - apr_set_pipe_timeout(attr->child_out, 0); - apr_set_pipe_timeout(attr->parent_out, 0); + apr_file_pipe_timeout_set(attr->child_out, 0); + apr_file_pipe_timeout_set(attr->parent_out, 0); } } if (err) { - if ((status = apr_create_pipe(&attr->parent_err, &attr->child_err, + if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err, attr->cntxt)) != APR_SUCCESS) { return status; } @@ -133,20 +133,20 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_err, 0); + apr_file_pipe_timeout_set(attr->child_err, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_err, 0); + apr_file_pipe_timeout_set(attr->parent_err, 0); break; default: - apr_set_pipe_timeout(attr->child_err, 0); - apr_set_pipe_timeout(attr->parent_err, 0); + apr_file_pipe_timeout_set(attr->child_err, 0); + apr_file_pipe_timeout_set(attr->parent_err, 0); } } return APR_SUCCESS; } -apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, +apr_status_t apr_procattr_dir_set(apr_procattr_t *attr, const char *dir) { char * cwd; @@ -166,20 +166,20 @@ apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, return APR_ENOMEM; } -apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr, +apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr, apr_cmdtype_e cmd) { attr->cmdtype = cmd; return APR_SUCCESS; } -apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach) +apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) { attr->detached = detach; return APR_SUCCESS; } -apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont) +apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont) { int pid; @@ -201,7 +201,7 @@ apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont) } -apr_status_t apr_create_process(apr_proc_t *new, const char *progname, +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) @@ -259,13 +259,13 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname, resume_thread(newproc); if (attr->child_in) { - apr_close(attr->child_in); + apr_file_close(attr->child_in); } if (attr->child_out) { - apr_close(attr->child_out); + apr_file_close(attr->child_out); } if (attr->child_err) { - apr_close(attr->child_err); + apr_file_close(attr->child_err); } send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe)); @@ -279,7 +279,7 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname, return APR_SUCCESS; } -apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, +apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, apr_wait_how_e waithow, apr_pool_t *p) { int waitpid_options = WUNTRACED; @@ -297,7 +297,7 @@ apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, return errno; } -apr_status_t apr_wait_proc(apr_proc_t *proc, +apr_status_t apr_proc_wait(apr_proc_t *proc, apr_wait_how_e wait) { status_t exitval, rv; @@ -321,52 +321,52 @@ apr_status_t apr_wait_proc(apr_proc_t *proc, return APR_CHILD_NOTDONE; } -apr_status_t apr_setprocattr_childin(apr_procattr_t *attr, apr_file_t *child_in, +apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in, apr_file_t *parent_in) { if (attr->child_in == NULL && attr->parent_in == NULL) - apr_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt); + apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt); if (child_in != NULL) - apr_dupfile(&attr->child_in, child_in, attr->cntxt); + apr_file_dup(&attr->child_in, child_in, attr->cntxt); if (parent_in != NULL) - apr_dupfile(&attr->parent_in, parent_in, attr->cntxt); + apr_file_dup(&attr->parent_in, parent_in, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_childout(apr_procattr_t *attr, apr_file_t *child_out, +apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out, apr_file_t *parent_out) { if (attr->child_out == NULL && attr->parent_out == NULL) - apr_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt); + apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt); if (child_out != NULL) - apr_dupfile(&attr->child_out, child_out, attr->cntxt); + apr_file_dup(&attr->child_out, child_out, attr->cntxt); if (parent_out != NULL) - apr_dupfile(&attr->parent_out, parent_out, attr->cntxt); + apr_file_dup(&attr->parent_out, parent_out, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_err, +apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err, apr_file_t *parent_err) { if (attr->child_err == NULL && attr->parent_err == NULL) - apr_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt); + apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt); if (child_err != NULL) - apr_dupfile(&attr->child_err, child_err, attr->cntxt); + apr_file_dup(&attr->child_err, child_err, attr->cntxt); if (parent_err != NULL) - apr_dupfile(&attr->parent_err, parent_err, attr->cntxt); + apr_file_dup(&attr->parent_err, parent_err, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_limit(apr_procattr_t *attr, apr_int32_t what, +apr_status_t apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what, void *limit) { return APR_ENOTIMPL; diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c index d141d835e..58880ac81 100644 --- a/threadproc/beos/thread.c +++ b/threadproc/beos/thread.c @@ -54,7 +54,7 @@ #include "threadproc.h" -apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) +apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont) { (*new) = (apr_threadattr_t *)apr_palloc(cont, sizeof(apr_threadattr_t)); @@ -69,7 +69,7 @@ apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) return APR_SUCCESS; } -apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on) { if (on == 1){ attr->detached = 1; @@ -79,7 +79,7 @@ apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) return APR_SUCCESS; } -apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr) +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr) { if (attr->detached == 1){ return APR_DETACH; @@ -87,7 +87,7 @@ apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr) return APR_NOTDETACH; } -apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, +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) { @@ -107,7 +107,7 @@ apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, else temp = B_NORMAL_PRIORITY; - stat = apr_create_pool(&(*new)->cntxt, cont); + stat = apr_pool_create(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } @@ -124,7 +124,7 @@ apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, apr_status_t apr_thread_exit(apr_thread_t *thd, apr_status_t *retval) { - apr_destroy_pool(thd->cntxt); + apr_pool_destroy(thd->cntxt); exit_thread ((status_t)retval); return APR_SUCCESS; } @@ -149,25 +149,25 @@ apr_status_t apr_thread_detach(apr_thread_t *thd) } } -apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread) +apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread) { - return apr_get_userdata(data, key, thread->cntxt); + return apr_pool_userdata_get(data, key, thread->cntxt); } -apr_status_t apr_set_threaddata(void *data, const char *key, +apr_status_t apr_thread_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_thread_t *thread) { - return apr_set_userdata(data, key, cleanup, thread->cntxt); + return apr_pool_userdata_set(data, key, cleanup, thread->cntxt); } -apr_status_t apr_get_os_thread(apr_os_thread_t **thethd, apr_thread_t *thd) +apr_status_t apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd) { *thethd = &thd->td; return APR_SUCCESS; } -apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd, +apr_status_t apr_os_thread_pupt(apr_thread_t **thd, apr_os_thread_t *thethd, apr_pool_t *cont) { if (cont == NULL) { diff --git a/threadproc/beos/threadpriv.c b/threadproc/beos/threadpriv.c index 037ce46a1..f6d34f222 100644 --- a/threadproc/beos/threadpriv.c +++ b/threadproc/beos/threadpriv.c @@ -58,7 +58,7 @@ static struct beos_key key_table[BEOS_MAX_DATAKEYS]; static struct beos_private_data *beos_data[BEOS_MAX_DATAKEYS]; static sem_id lock; -apr_status_t apr_create_thread_private(apr_threadkey_t **key, +apr_status_t apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont) { (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t)); @@ -82,7 +82,7 @@ apr_status_t apr_create_thread_private(apr_threadkey_t **key, return APR_ENOMEM; } -apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key) { thread_id tid; int i, index=0; @@ -114,7 +114,7 @@ apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key) return APR_SUCCESS; } -apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key) { thread_id tid; int i,index = 0, ret; @@ -169,7 +169,7 @@ apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key) return APR_ENOMEM; } -apr_status_t apr_delete_thread_private(apr_threadkey_t *key) +apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key) { if (key->key < BEOS_MAX_DATAKEYS){ acquire_sem(key_table[key->key].lock); @@ -184,26 +184,26 @@ apr_status_t apr_delete_thread_private(apr_threadkey_t *key) return APR_SUCCESS; } -apr_status_t apr_get_threadkeydata(void **data, const char *key, +apr_status_t apr_threadkey_data_get(void **data, const char *key, apr_threadkey_t *threadkey) { - return apr_get_userdata(data, key, threadkey->cntxt); + return apr_pool_userdata_get(data, key, threadkey->cntxt); } -apr_status_t apr_set_threadkeydata(void *data, const char *key, +apr_status_t apr_threadkey_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_threadkey_t *threadkey) { - return apr_set_userdata(data, key, cleanup, threadkey->cntxt); + return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt); } -apr_status_t apr_get_os_threadkey(apr_os_threadkey_t *thekey, apr_threadkey_t *key) +apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key) { *thekey = key->key; return APR_SUCCESS; } -apr_status_t apr_put_os_threadkey(apr_threadkey_t **key, +apr_status_t apr_os_threadkey_put(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont) { if (cont == NULL) { diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c index 9231c6686..4c0f2b66b 100644 --- a/threadproc/os2/proc.c +++ b/threadproc/os2/proc.c @@ -71,7 +71,7 @@ #include <process.h> #include <stdlib.h> -apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont) +apr_status_t apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont) { (*new) = (apr_procattr_t *)apr_palloc(cont, sizeof(apr_procattr_t)); @@ -92,12 +92,12 @@ apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont) return APR_SUCCESS; } -apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, +apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, apr_int32_t out, apr_int32_t err) { apr_status_t stat; if (in) { - if ((stat = apr_create_pipe(&attr->child_in, &attr->parent_in, + if ((stat = apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt)) != APR_SUCCESS) { return stat; } @@ -105,18 +105,18 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_in, 0); + apr_file_pipe_timeout_set(attr->child_in, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_in, 0); + apr_file_pipe_timeout_set(attr->parent_in, 0); break; default: - apr_set_pipe_timeout(attr->child_in, 0); - apr_set_pipe_timeout(attr->parent_in, 0); + apr_file_pipe_timeout_set(attr->child_in, 0); + apr_file_pipe_timeout_set(attr->parent_in, 0); } } if (out) { - if ((stat = apr_create_pipe(&attr->parent_out, &attr->child_out, + if ((stat = apr_file_pipe_create(&attr->parent_out, &attr->child_out, attr->cntxt)) != APR_SUCCESS) { return stat; } @@ -124,18 +124,18 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_out, 0); + apr_file_pipe_timeout_set(attr->child_out, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_out, 0); + apr_file_pipe_timeout_set(attr->parent_out, 0); break; default: - apr_set_pipe_timeout(attr->child_out, 0); - apr_set_pipe_timeout(attr->parent_out, 0); + apr_file_pipe_timeout_set(attr->child_out, 0); + apr_file_pipe_timeout_set(attr->parent_out, 0); } } if (err) { - if ((stat = apr_create_pipe(&attr->parent_err, &attr->child_err, + if ((stat = apr_file_pipe_create(&attr->parent_err, &attr->child_err, attr->cntxt)) != APR_SUCCESS) { return stat; } @@ -143,68 +143,68 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_err, 0); + apr_file_pipe_timeout_set(attr->child_err, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_err, 0); + apr_file_pipe_timeout_set(attr->parent_err, 0); break; default: - apr_set_pipe_timeout(attr->child_err, 0); - apr_set_pipe_timeout(attr->parent_err, 0); + apr_file_pipe_timeout_set(attr->child_err, 0); + apr_file_pipe_timeout_set(attr->parent_err, 0); } } return APR_SUCCESS; } -apr_status_t apr_setprocattr_childin(apr_procattr_t *attr, apr_file_t *child_in, +apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in, apr_file_t *parent_in) { if (attr->child_in == NULL && attr->parent_in == NULL) - apr_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt); + apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt); if (child_in != NULL) - apr_dupfile(&attr->child_in, child_in, attr->cntxt); + apr_file_dup(&attr->child_in, child_in, attr->cntxt); if (parent_in != NULL) - apr_dupfile(&attr->parent_in, parent_in, attr->cntxt); + apr_file_dup(&attr->parent_in, parent_in, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_childout(apr_procattr_t *attr, apr_file_t *child_out, +apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out, apr_file_t *parent_out) { if (attr->child_out == NULL && attr->parent_out == NULL) - apr_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt); + apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt); if (child_out != NULL) - apr_dupfile(&attr->child_out, child_out, attr->cntxt); + apr_file_dup(&attr->child_out, child_out, attr->cntxt); if (parent_out != NULL) - apr_dupfile(&attr->parent_out, parent_out, attr->cntxt); + apr_file_dup(&attr->parent_out, parent_out, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_err, +apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err, apr_file_t *parent_err) { if (attr->child_err == NULL && attr->parent_err == NULL) - apr_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt); + apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt); if (child_err != NULL) - apr_dupfile(&attr->child_err, child_err, attr->cntxt); + apr_file_dup(&attr->child_err, child_err, attr->cntxt); if (parent_err != NULL) - apr_dupfile(&attr->parent_err, parent_err, attr->cntxt); + apr_file_dup(&attr->parent_err, parent_err, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, const char *dir) +apr_status_t apr_procattr_dir_set(apr_procattr_t *attr, const char *dir) { attr->currdir = apr_pstrdup(attr->cntxt, dir); if (attr->currdir) { @@ -213,20 +213,20 @@ apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, const char *dir) return APR_ENOMEM; } -apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr, +apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr, apr_cmdtype_e cmd) { attr->cmdtype = cmd; return APR_SUCCESS; } -apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach) +apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) { attr->detached = detach; return APR_SUCCESS; } -apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont) +apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont) { int pid; @@ -277,7 +277,7 @@ static char *double_quotes(apr_pool_t *cntxt, const char *str) -apr_status_t apr_create_process(apr_proc_t *proc, const char *progname, +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) @@ -348,14 +348,14 @@ apr_status_t apr_create_process(apr_proc_t *proc, const char *progname, strcpy(interpreter, "#!" SHELL_PATH); extra_arg = "/C"; } else if (stricmp(extension, ".exe") != 0) { - status = apr_open(&progfile, progname, APR_READ|APR_BUFFERED, 0, cont); + status = apr_file_open(&progfile, progname, APR_READ|APR_BUFFERED, 0, cont); if (status != APR_SUCCESS && APR_STATUS_IS_ENOENT(status)) { progname = apr_pstrcat(cont, progname, ".exe", NULL); } if (status == APR_SUCCESS) { - status = apr_fgets(interpreter, sizeof(interpreter), progfile); + status = apr_file_gets(interpreter, sizeof(interpreter), progfile); if (status == APR_SUCCESS) { if (interpreter[0] == '#' && interpreter[1] == '!') { @@ -376,7 +376,7 @@ apr_status_t apr_create_process(apr_proc_t *proc, const char *progname, } } } - apr_close(progfile); + apr_file_close(progfile); } i = 0; @@ -461,21 +461,21 @@ apr_status_t apr_create_process(apr_proc_t *proc, const char *progname, } if (attr->child_in) { - apr_close(attr->child_in); + apr_file_close(attr->child_in); dup = STDIN_FILENO; DosDupHandle(save_in, &dup); DosClose(save_in); } if (attr->child_out) { - apr_close(attr->child_out); + apr_file_close(attr->child_out); dup = STDOUT_FILENO; DosDupHandle(save_out, &dup); DosClose(save_out); } if (attr->child_err) { - apr_close(attr->child_err); + apr_file_close(attr->child_err); dup = STDERR_FILENO; DosDupHandle(save_err, &dup); DosClose(save_err); @@ -492,7 +492,7 @@ apr_status_t apr_create_process(apr_proc_t *proc, const char *progname, -apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, +apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, apr_wait_how_e waithow, apr_pool_t *p) { RESULTCODES codes; @@ -520,7 +520,7 @@ apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, -apr_status_t apr_wait_proc(apr_proc_t *proc, +apr_status_t apr_proc_wait(apr_proc_t *proc, apr_wait_how_e wait) { RESULTCODES codes; diff --git a/threadproc/os2/signals.c b/threadproc/os2/signals.c index 56170f401..e15697d5a 100644 --- a/threadproc/os2/signals.c +++ b/threadproc/os2/signals.c @@ -62,7 +62,7 @@ #include <string.h> #include <sys/wait.h> -apr_status_t apr_kill(apr_proc_t *proc, int signal) +apr_status_t apr_proc_kill(apr_proc_t *proc, int signal) { /* SIGTERM's don't work too well in OS/2 (only affects other EMX programs). CGIs may not be, esp. REXX scripts, so use a native call instead */ diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c index a99eb5968..b0682e58a 100644 --- a/threadproc/os2/thread.c +++ b/threadproc/os2/thread.c @@ -61,7 +61,7 @@ #include "fileio.h" #include <stdlib.h> -apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) +apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont) { (*new) = (apr_threadattr_t *)apr_palloc(cont, sizeof(apr_threadattr_t)); @@ -76,7 +76,7 @@ apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) -apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on) { attr->attr |= APR_THREADATTR_DETACHED; return APR_SUCCESS; @@ -84,7 +84,7 @@ apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) -apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr) +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr) { return (attr->attr & APR_THREADATTR_DETACHED) ? APR_DETACH : APR_NOTDETACH; } @@ -99,7 +99,7 @@ static void apr_thread_begin(void *arg) -apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, +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) { @@ -117,14 +117,14 @@ apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, thread->attr = attr; thread->func = func; thread->data = data; - stat = apr_create_pool(&thread->cntxt, cont); + stat = apr_pool_create(&thread->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } if (attr == NULL) { - stat = apr_create_threadattr(&thread->attr, thread->cntxt); + stat = apr_threadattr_create(&thread->attr, thread->cntxt); if (stat != APR_SUCCESS) { return stat; diff --git a/threadproc/os2/threadpriv.c b/threadproc/os2/threadpriv.c index 15143e512..24291b8f4 100644 --- a/threadproc/os2/threadpriv.c +++ b/threadproc/os2/threadpriv.c @@ -59,7 +59,7 @@ #include "apr_lib.h" #include "fileio.h" -apr_status_t apr_create_thread_private(apr_threadkey_t **key, +apr_status_t apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont) { (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t)); @@ -72,19 +72,19 @@ apr_status_t apr_create_thread_private(apr_threadkey_t **key, return APR_OS2_STATUS(DosAllocThreadLocalMemory(1, &((*key)->key))); } -apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key) { (*new) = (void *)*(key->key); return APR_SUCCESS; } -apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key) { *(key->key) = (ULONG)priv; return APR_SUCCESS; } -apr_status_t apr_delete_thread_private(apr_threadkey_t *key) +apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key) { return APR_OS2_STATUS(DosFreeThreadLocalMemory(key->key)); } diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c index 6f91f21e4..58b49493a 100644 --- a/threadproc/unix/proc.c +++ b/threadproc/unix/proc.c @@ -56,7 +56,7 @@ #include "apr_strings.h" #include "apr_portable.h" -apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont) +apr_status_t apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont) { (*new) = (apr_procattr_t *)apr_pcalloc(cont, sizeof(apr_procattr_t)); @@ -68,12 +68,12 @@ apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont) return APR_SUCCESS; } -apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, +apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, apr_int32_t out, apr_int32_t err) { apr_status_t status; if (in != 0) { - if ((status = apr_create_pipe(&attr->child_in, &attr->parent_in, + if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt)) != APR_SUCCESS) { return status; } @@ -81,18 +81,18 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_in, 0); + apr_file_pipe_timeout_set(attr->child_in, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_in, 0); + apr_file_pipe_timeout_set(attr->parent_in, 0); break; default: - apr_set_pipe_timeout(attr->child_in, 0); - apr_set_pipe_timeout(attr->parent_in, 0); + apr_file_pipe_timeout_set(attr->child_in, 0); + apr_file_pipe_timeout_set(attr->parent_in, 0); } } if (out) { - if ((status = apr_create_pipe(&attr->parent_out, &attr->child_out, + if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out, attr->cntxt)) != APR_SUCCESS) { return status; } @@ -100,18 +100,18 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_out, 0); + apr_file_pipe_timeout_set(attr->child_out, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_out, 0); + apr_file_pipe_timeout_set(attr->parent_out, 0); break; default: - apr_set_pipe_timeout(attr->child_out, 0); - apr_set_pipe_timeout(attr->parent_out, 0); + apr_file_pipe_timeout_set(attr->child_out, 0); + apr_file_pipe_timeout_set(attr->parent_out, 0); } } if (err) { - if ((status = apr_create_pipe(&attr->parent_err, &attr->child_err, + if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err, attr->cntxt)) != APR_SUCCESS) { return status; } @@ -119,69 +119,69 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, case APR_FULL_BLOCK: break; case APR_PARENT_BLOCK: - apr_set_pipe_timeout(attr->child_err, 0); + apr_file_pipe_timeout_set(attr->child_err, 0); break; case APR_CHILD_BLOCK: - apr_set_pipe_timeout(attr->parent_err, 0); + apr_file_pipe_timeout_set(attr->parent_err, 0); break; default: - apr_set_pipe_timeout(attr->child_err, 0); - apr_set_pipe_timeout(attr->parent_err, 0); + apr_file_pipe_timeout_set(attr->child_err, 0); + apr_file_pipe_timeout_set(attr->parent_err, 0); } } return APR_SUCCESS; } -apr_status_t apr_setprocattr_childin(apr_procattr_t *attr, apr_file_t *child_in, +apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in, apr_file_t *parent_in) { if (attr->child_in == NULL && attr->parent_in == NULL) - apr_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt); + apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt); if (child_in != NULL) - apr_dupfile(&attr->child_in, child_in, attr->cntxt); + apr_file_dup(&attr->child_in, child_in, attr->cntxt); if (parent_in != NULL) - apr_dupfile(&attr->parent_in, parent_in, attr->cntxt); + apr_file_dup(&attr->parent_in, parent_in, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_childout(apr_procattr_t *attr, apr_file_t *child_out, +apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out, apr_file_t *parent_out) { if (attr->child_out == NULL && attr->parent_out == NULL) - apr_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt); + apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt); if (child_out != NULL) - apr_dupfile(&attr->child_out, child_out, attr->cntxt); + apr_file_dup(&attr->child_out, child_out, attr->cntxt); if (parent_out != NULL) - apr_dupfile(&attr->parent_out, parent_out, attr->cntxt); + apr_file_dup(&attr->parent_out, parent_out, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_err, +apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err, apr_file_t *parent_err) { if (attr->child_err == NULL && attr->parent_err == NULL) - apr_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt); + apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt); if (child_err != NULL) - apr_dupfile(&attr->child_err, child_err, attr->cntxt); + apr_file_dup(&attr->child_err, child_err, attr->cntxt); if (parent_err != NULL) - apr_dupfile(&attr->parent_err, parent_err, attr->cntxt); + apr_file_dup(&attr->parent_err, parent_err, attr->cntxt); return APR_SUCCESS; } -apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, +apr_status_t apr_procattr_dir_set(apr_procattr_t *attr, const char *dir) { attr->currdir = apr_pstrdup(attr->cntxt, dir); @@ -191,20 +191,20 @@ apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, return APR_ENOMEM; } -apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr, +apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr, apr_cmdtype_e cmd) { attr->cmdtype = cmd; return APR_SUCCESS; } -apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach) +apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) { attr->detached = detach; return APR_SUCCESS; } -apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont) +apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont) { int pid; @@ -270,7 +270,7 @@ static apr_status_t limit_proc(apr_procattr_t *attr) return APR_SUCCESS; } -apr_status_t apr_create_process(apr_proc_t *new, const char *progname, +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) @@ -288,19 +288,19 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname, int status; /* child process */ if (attr->child_in) { - apr_close(attr->parent_in); + apr_file_close(attr->parent_in); dup2(attr->child_in->filedes, STDIN_FILENO); - apr_close(attr->child_in); + apr_file_close(attr->child_in); } if (attr->child_out) { - apr_close(attr->parent_out); + apr_file_close(attr->parent_out); dup2(attr->child_out->filedes, STDOUT_FILENO); - apr_close(attr->child_out); + apr_file_close(attr->child_out); } if (attr->child_err) { - apr_close(attr->parent_err); + apr_file_close(attr->parent_err); dup2(attr->child_err->filedes, STDERR_FILENO); - apr_close(attr->child_err); + apr_file_close(attr->child_err); } apr_signal(SIGCHLD, SIG_DFL); /*not sure if this is needed or not */ @@ -311,7 +311,7 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname, } } - apr_cleanup_for_exec(); + apr_pool_cleanup_for_exec(); if ((status = limit_proc(attr)) != APR_SUCCESS) { return status; @@ -333,13 +333,13 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname, } newargs[i + 2] = NULL; if (attr->detached) { - apr_detach(); + apr_proc_detach(); } execve(SHELL_PATH, (char * const *) newargs, (char * const *)env); } else { if (attr->detached) { - apr_detach(); + apr_proc_detach(); } execve(progname, (char * const *)args, (char * const *)env); } @@ -348,18 +348,18 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname, } /* Parent process */ if (attr->child_in) { - apr_close(attr->child_in); + apr_file_close(attr->child_in); } if (attr->child_out) { - apr_close(attr->child_out); + apr_file_close(attr->child_out); } if (attr->child_err) { - apr_close(attr->child_err); + apr_file_close(attr->child_err); } return APR_SUCCESS; } -apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, +apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, apr_wait_how_e waithow, apr_pool_t *p) { int waitpid_options = WUNTRACED; @@ -377,7 +377,7 @@ apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, return errno; } -apr_status_t apr_wait_proc(apr_proc_t *proc, +apr_status_t apr_proc_wait(apr_proc_t *proc, apr_wait_how_e waithow) { pid_t status; @@ -401,7 +401,7 @@ apr_status_t apr_wait_proc(apr_proc_t *proc, return errno; } -apr_status_t apr_setprocattr_limit(apr_procattr_t *attr, apr_int32_t what, +apr_status_t apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what, struct rlimit *limit) { switch(what) { diff --git a/threadproc/unix/procsup.c b/threadproc/unix/procsup.c index e29954cda..dd2fffb1e 100644 --- a/threadproc/unix/procsup.c +++ b/threadproc/unix/procsup.c @@ -54,7 +54,7 @@ #include "threadproc.h" -apr_status_t apr_detach(void) +apr_status_t apr_proc_detach(void) { int x; pid_t pgrp; diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c index cd561fa82..c402fb446 100644 --- a/threadproc/unix/signals.c +++ b/threadproc/unix/signals.c @@ -59,7 +59,7 @@ #include <signal.h> #endif -apr_status_t apr_kill(apr_proc_t *proc, int sig) +apr_status_t apr_proc_kill(apr_proc_t *proc, int sig) { if (kill(proc->pid, sig) == -1) { return errno; diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c index c083fb89e..457bccdad 100644 --- a/threadproc/unix/thread.c +++ b/threadproc/unix/thread.c @@ -59,7 +59,7 @@ #if APR_HAS_THREADS #if APR_HAVE_PTHREAD_H -apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) +apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont) { apr_status_t stat; @@ -82,7 +82,7 @@ apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) return stat; } -apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on) { apr_status_t stat; #ifdef PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR @@ -102,7 +102,7 @@ apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) } } -apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr) +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr) { int state; @@ -116,7 +116,7 @@ apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr) return APR_NOTDETACH; } -apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, +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) { @@ -142,7 +142,7 @@ apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, else temp = NULL; - stat = apr_create_pool(&(*new)->cntxt, cont); + stat = apr_pool_create(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } @@ -160,7 +160,7 @@ apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr, apr_status_t apr_thread_exit(apr_thread_t *thd, apr_status_t *retval) { - apr_destroy_pool(thd->cntxt); + apr_pool_destroy(thd->cntxt); pthread_exit(retval); return APR_SUCCESS; } @@ -199,25 +199,25 @@ apr_status_t apr_thread_detach(apr_thread_t *thd) } } -apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread) +apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread) { - return apr_get_userdata(data, key, thread->cntxt); + return apr_pool_userdata_get(data, key, thread->cntxt); } -apr_status_t apr_set_threaddata(void *data, const char *key, +apr_status_t apr_thread_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_thread_t *thread) { - return apr_set_userdata(data, key, cleanup, thread->cntxt); + return apr_pool_userdata_set(data, key, cleanup, thread->cntxt); } -apr_status_t apr_get_os_thread(apr_os_thread_t **thethd, apr_thread_t *thd) +apr_status_t apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd) { *thethd = thd->td; return APR_SUCCESS; } -apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd, +apr_status_t apr_os_thread_pupt(apr_thread_t **thd, apr_os_thread_t *thethd, apr_pool_t *cont) { if (cont == NULL) { @@ -235,77 +235,77 @@ apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd, #if !APR_HAS_THREADS -apr_status_t apr_create_thread(apr_thread_t **new_thread, apr_threadattr_t *attr, +apr_status_t apr_thread_create(apr_thread_t **new_thread, apr_threadattr_t *attr, apr_thread_start_t func, void *data, apr_pool_t *cont) { return APR_ENOTIMPL; } -apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont) +apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont) { return APR_ENOTIMPL; } -apr_status_t apr_create_thread_private(apr_threadkey_t **key, void (*dest)(void *), +apr_status_t apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont) { return APR_ENOTIMPL; } -apr_status_t apr_delete_thread_private(apr_threadkey_t *key) +apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key) { return APR_ENOTIMPL; } -apr_status_t apr_get_os_thread(void); /* avoid warning for no prototype */ +apr_status_t apr_os_thread_get(void); /* avoid warning for no prototype */ -apr_status_t apr_get_os_thread(void) +apr_status_t apr_os_thread_get(void) { return APR_ENOTIMPL; } -apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr) +apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr) { return APR_ENOTIMPL; } -apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread) +apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread) { return APR_ENOTIMPL; } -apr_status_t apr_get_threadkeydata(void **data, const char *key, +apr_status_t apr_threadkey_data_get(void **data, const char *key, apr_threadkey_t *threadkey) { return APR_ENOTIMPL; } -apr_status_t apr_get_thread_private(void **new_mem, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_get(void **new_mem, apr_threadkey_t *key) { return APR_ENOTIMPL; } -apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on) +apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on) { return APR_ENOTIMPL; } -apr_status_t apr_set_threaddata(void *data, const char *key, +apr_status_t apr_thread_data_set(void *data, const char *key, apr_status_t (*cleanup)(void *), apr_thread_t *thread) { return APR_ENOTIMPL; } -apr_status_t apr_set_threadkeydata(void *data, const char *key, +apr_status_t apr_threadkey_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_threadkey_t *threadkey) { return APR_ENOTIMPL; } -apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key) { return APR_ENOTIMPL; } diff --git a/threadproc/unix/threadpriv.c b/threadproc/unix/threadpriv.c index 9843f2e91..0780335f8 100644 --- a/threadproc/unix/threadpriv.c +++ b/threadproc/unix/threadpriv.c @@ -59,7 +59,7 @@ #if APR_HAS_THREADS #if APR_HAVE_PTHREAD_H -apr_status_t apr_create_thread_private(apr_threadkey_t **key, +apr_status_t apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont) { apr_status_t stat; @@ -77,7 +77,7 @@ apr_status_t apr_create_thread_private(apr_threadkey_t **key, return stat; } -apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key) { #ifdef PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS if (pthread_getspecific(key->key,new)) @@ -88,7 +88,7 @@ apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key) return APR_SUCCESS; } -apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key) +apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key) { apr_status_t stat; if ((stat = pthread_setspecific(key->key, priv)) == 0) { @@ -100,7 +100,7 @@ apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key) } #ifdef HAVE_PTHREAD_KEY_DELETE -apr_status_t apr_delete_thread_private(apr_threadkey_t *key) +apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key) { apr_status_t stat; if ((stat = pthread_key_delete(key->key)) == 0) { @@ -110,26 +110,26 @@ apr_status_t apr_delete_thread_private(apr_threadkey_t *key) } #endif -apr_status_t apr_get_threadkeydata(void **data, const char *key, +apr_status_t apr_threadkey_data_get(void **data, const char *key, apr_threadkey_t *threadkey) { - return apr_get_userdata(data, key, threadkey->cntxt); + return apr_pool_userdata_get(data, key, threadkey->cntxt); } -apr_status_t apr_set_threadkeydata(void *data, const char *key, +apr_status_t apr_threadkey_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_threadkey_t *threadkey) { - return apr_set_userdata(data, key, cleanup, threadkey->cntxt); + return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt); } -apr_status_t apr_get_os_threadkey(apr_os_threadkey_t *thekey, apr_threadkey_t *key) +apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key) { *thekey = key->key; return APR_SUCCESS; } -apr_status_t apr_put_os_threadkey(apr_threadkey_t **key, +apr_status_t apr_os_threadkey_put(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont) { if (cont == NULL) { @@ -146,9 +146,9 @@ apr_status_t apr_put_os_threadkey(apr_threadkey_t **key, #endif /* APR_HAS_THREADS */ #if !APR_HAS_THREADS -apr_status_t apr_get_os_threadkey(void); /* avoid warning for no prototype */ +apr_status_t apr_os_threadkey_get(void); /* avoid warning for no prototype */ -apr_status_t apr_get_os_threadkey(void) +apr_status_t apr_os_threadkey_get(void) { return APR_ENOTIMPL; } diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c index c0fe0c8f0..9d2e3a422 100644 --- a/threadproc/win32/proc.c +++ b/threadproc/win32/proc.c @@ -71,7 +71,7 @@ * */ -APR_DECLARE(apr_status_t) apr_createprocattr_init(apr_procattr_t **new, +APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont) { (*new) = (apr_procattr_t *)apr_palloc(cont, sizeof(apr_procattr_t)); @@ -152,7 +152,7 @@ static apr_status_t make_inheritable_duplicate(apr_file_t *original, if (original == NULL) return APR_SUCCESS; - /* Can't use apr_dupfile here because it creates a non-inhertible + /* Can't use apr_file_dup here because it creates a non-inhertible * handle, and apr_open_file'd apr_file_t's are non-inheritable, * so we must assume we need to make an inheritable handle. */ @@ -170,7 +170,7 @@ static apr_status_t make_inheritable_duplicate(apr_file_t *original, return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_setprocattr_io(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, apr_int32_t out, apr_int32_t err) @@ -204,7 +204,7 @@ APR_DECLARE(apr_status_t) apr_setprocattr_io(apr_procattr_t *attr, return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_setprocattr_childin(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in, apr_file_t *parent_in) { @@ -227,7 +227,7 @@ APR_DECLARE(apr_status_t) apr_setprocattr_childin(apr_procattr_t *attr, return stat; } -APR_DECLARE(apr_status_t) apr_setprocattr_childout(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out, apr_file_t *parent_out) { @@ -250,7 +250,7 @@ APR_DECLARE(apr_status_t) apr_setprocattr_childout(apr_procattr_t *attr, return stat; } -APR_DECLARE(apr_status_t) apr_setprocattr_childerr(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err, apr_file_t *parent_err) { @@ -273,7 +273,7 @@ APR_DECLARE(apr_status_t) apr_setprocattr_childerr(apr_procattr_t *attr, return stat; } -APR_DECLARE(apr_status_t) apr_setprocattr_dir(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, const char *dir) { char path[MAX_PATH]; @@ -297,14 +297,14 @@ APR_DECLARE(apr_status_t) apr_setprocattr_dir(apr_procattr_t *attr, return APR_ENOMEM; } -APR_DECLARE(apr_status_t) apr_setprocattr_cmdtype(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr, apr_cmdtype_e cmd) { attr->cmdtype = cmd; return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_setprocattr_detach(apr_procattr_t *attr, +APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t det) { attr->detached = det; @@ -312,11 +312,11 @@ APR_DECLARE(apr_status_t) apr_setprocattr_detach(apr_procattr_t *attr, } /* TODO: - * apr_create_process with APR_SHELLCMD on Win9x won't work due to MS KB: + * apr_proc_create with APR_SHELLCMD on Win9x won't work due to MS KB: * Q150956 */ -APR_DECLARE(apr_status_t) apr_create_process(apr_proc_t *new, +APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname, const char * const *args, const char * const *env, @@ -440,13 +440,13 @@ APR_DECLARE(apr_status_t) apr_create_process(apr_proc_t *new, new->pid = (pid_t) pi.hProcess; if (attr->child_in) { - apr_close(attr->child_in); + apr_file_close(attr->child_in); } if (attr->child_out) { - apr_close(attr->child_out); + apr_file_close(attr->child_out); } if (attr->child_err) { - apr_close(attr->child_err); + apr_file_close(attr->child_err); } CloseHandle(pi.hThread); @@ -456,7 +456,7 @@ APR_DECLARE(apr_status_t) apr_create_process(apr_proc_t *new, return apr_get_os_error(); } -APR_DECLARE(apr_status_t) apr_wait_proc(apr_proc_t *proc, apr_wait_how_e wait) +APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc, apr_wait_how_e wait) { DWORD stat; if (!proc) diff --git a/threadproc/win32/signals.c b/threadproc/win32/signals.c index 056de8904..dc59c8690 100644 --- a/threadproc/win32/signals.c +++ b/threadproc/win32/signals.c @@ -64,7 +64,7 @@ #endif /* Windows only really support killing process, but that will do for now. */ -APR_DECLARE(apr_status_t) apr_kill(apr_proc_t *proc, int signal) +APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signal) { if (TerminateProcess((HANDLE)proc->pid, signal) == 0) { return apr_get_os_error(); diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c index 231d2e366..b243d8359 100644 --- a/threadproc/win32/thread.c +++ b/threadproc/win32/thread.c @@ -61,7 +61,7 @@ #include <process.h> -APR_DECLARE(apr_status_t) apr_create_threadattr(apr_threadattr_t **new, +APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont) { (*new) = (apr_threadattr_t *)apr_palloc(cont, @@ -75,21 +75,21 @@ APR_DECLARE(apr_status_t) apr_create_threadattr(apr_threadattr_t **new, return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_setthreadattr_detach(apr_threadattr_t *attr, +APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on) { attr->detach = on; return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_getthreadattr_detach(apr_threadattr_t *attr) +APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr) { if (attr->detach == 1) return APR_DETACH; return APR_NOTDETACH; } -APR_DECLARE(apr_status_t) apr_create_thread(apr_thread_t **new, +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) @@ -106,7 +106,7 @@ APR_DECLARE(apr_status_t) apr_create_thread(apr_thread_t **new, (*new)->cntxt = cont; - stat = apr_create_pool(&(*new)->cntxt, cont); + stat = apr_pool_create(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } @@ -133,7 +133,7 @@ APR_DECLARE(apr_status_t) apr_create_thread(apr_thread_t **new, APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, apr_status_t *retval) { - apr_destroy_pool(thd->cntxt); + apr_pool_destroy(thd->cntxt); _endthreadex(*retval); return APR_SUCCESS; } @@ -164,20 +164,20 @@ APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd) } } -APR_DECLARE(apr_status_t) apr_get_threaddata(void **data, const char *key, +APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key, apr_thread_t *thread) { - return apr_get_userdata(data, key, thread->cntxt); + return apr_pool_userdata_get(data, key, thread->cntxt); } -APR_DECLARE(apr_status_t) apr_set_threaddata(void *data, const char *key, +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_set_userdata(data, key, cleanup, thread->cntxt); + return apr_pool_userdata_set(data, key, cleanup, thread->cntxt); } -APR_DECLARE(apr_status_t) apr_get_os_thread(apr_os_thread_t **thethd, +APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd) { if (thd == NULL) { @@ -187,7 +187,7 @@ APR_DECLARE(apr_status_t) apr_get_os_thread(apr_os_thread_t **thethd, return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_put_os_thread(apr_thread_t **thd, +APR_DECLARE(apr_status_t) apr_os_thread_pupt(apr_thread_t **thd, apr_os_thread_t *thethd, apr_pool_t *cont) { diff --git a/threadproc/win32/threadpriv.c b/threadproc/win32/threadpriv.c index 701282356..da0baf216 100644 --- a/threadproc/win32/threadpriv.c +++ b/threadproc/win32/threadpriv.c @@ -59,7 +59,7 @@ #include "apr_errno.h" #include "apr_portable.h" -APR_DECLARE(apr_status_t) apr_create_thread_private(apr_threadkey_t **key, +APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont) { @@ -69,7 +69,7 @@ APR_DECLARE(apr_status_t) apr_create_thread_private(apr_threadkey_t **key, return apr_get_os_error(); } -APR_DECLARE(apr_status_t) apr_get_thread_private(void **new, +APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new, apr_threadkey_t *key) { if ((*new) = TlsGetValue(key->key)) { @@ -78,7 +78,7 @@ APR_DECLARE(apr_status_t) apr_get_thread_private(void **new, return apr_get_os_error(); } -APR_DECLARE(apr_status_t) apr_set_thread_private(void *priv, +APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv, apr_threadkey_t *key) { if (TlsSetValue(key->key, priv)) { @@ -87,7 +87,7 @@ APR_DECLARE(apr_status_t) apr_set_thread_private(void *priv, return apr_get_os_error(); } -APR_DECLARE(apr_status_t) apr_delete_thread_private(apr_threadkey_t *key) +APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key) { if (TlsFree(key->key)) { return APR_SUCCESS; @@ -95,27 +95,27 @@ APR_DECLARE(apr_status_t) apr_delete_thread_private(apr_threadkey_t *key) return apr_get_os_error(); } -APR_DECLARE(apr_status_t) apr_get_threadkeydata(void **data, const char *key, +APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key, apr_threadkey_t *threadkey) { - return apr_get_userdata(data, key, threadkey->cntxt); + return apr_pool_userdata_get(data, key, threadkey->cntxt); } -APR_DECLARE(apr_status_t) apr_set_threadkeydata(void *data, const char *key, +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_set_userdata(data, key, cleanup, threadkey->cntxt); + return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt); } -APR_DECLARE(apr_status_t) apr_get_os_threadkey(apr_os_threadkey_t *thekey, +APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key) { *thekey = key->key; return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_put_os_threadkey(apr_threadkey_t **key, +APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont) { |