Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 49160 invoked from network); 26 Nov 2007 01:10:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2007 01:10:56 -0000 Received: (qmail 5386 invoked by uid 500); 26 Nov 2007 01:10:43 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 5326 invoked by uid 500); 26 Nov 2007 01:10:43 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 5315 invoked by uid 99); 26 Nov 2007 01:10:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Nov 2007 17:10:43 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 01:10:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 122131A9868; Sun, 25 Nov 2007 17:09:23 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r598101 [29/31] - in /apr/site/trunk/docs/docs: apr-util/0.9/ apr-util/1.2/ apr-util/trunk/ apr/0.9/ apr/1.2/ apr/trunk/ Date: Mon, 26 Nov 2007 01:06:54 -0000 To: commits@apr.apache.org From: bojan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071126010923.122131A9868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html?rev=598101&r1=598100&r2=598101&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html Sun Nov 25 17:05:47 2007 @@ -100,726 +100,752 @@ 00077 00078 /** @see apr_procattr_io_set */ 00079 #define APR_NO_PIPE 0 -00080 -00081 /** @see apr_procattr_io_set */ -00082 #define APR_FULL_BLOCK 1 -00083 /** @see apr_procattr_io_set */ -00084 #define APR_FULL_NONBLOCK 2 -00085 /** @see apr_procattr_io_set */ -00086 #define APR_PARENT_BLOCK 3 -00087 /** @see apr_procattr_io_set */ -00088 #define APR_CHILD_BLOCK 4 -00089 -00090 /** @see apr_procattr_limit_set */ -00091 #define APR_LIMIT_CPU 0 -00092 /** @see apr_procattr_limit_set */ -00093 #define APR_LIMIT_MEM 1 -00094 /** @see apr_procattr_limit_set */ -00095 #define APR_LIMIT_NPROC 2 -00096 /** @see apr_procattr_limit_set */ -00097 #define APR_LIMIT_NOFILE 3 -00098 -00099 /** -00100 * @defgroup APR_OC Other Child Flags -00101 * @{ -00102 */ -00103 #define APR_OC_REASON_DEATH 0 /**< child has died, caller must call -00104 * unregister still */ -00105 #define APR_OC_REASON_UNWRITABLE 1 /**< write_fd is unwritable */ -00106 #define APR_OC_REASON_RESTART 2 /**< a restart is occuring, perform -00107 * any necessary cleanup (including -00108 * sending a special signal to child) -00109 */ -00110 #define APR_OC_REASON_UNREGISTER 3 /**< unregister has been called, do -00111 * whatever is necessary (including -00112 * kill the child) */ -00113 #define APR_OC_REASON_LOST 4 /**< somehow the child exited without -00114 * us knowing ... buggy os? */ -00115 #define APR_OC_REASON_RUNNING 5 /**< a health check is occuring, -00116 * for most maintainence functions -00117 * this is a no-op. -00118 */ -00119 /** @} */ -00120 -00121 /** The APR process type */ -00122 typedef struct apr_proc_t { -00123 /** The process ID */ -00124 pid_t pid; -00125 /** Parent's side of pipe to child's stdin */ -00126 apr_file_t *in; -00127 /** Parent's side of pipe to child's stdout */ -00128 apr_file_t *out; -00129 /** Parent's side of pipe to child's stdouterr */ -00130 apr_file_t *err; -00131 #if APR_HAS_PROC_INVOKED || defined(DOXYGEN) -00132 /** Diagnositics/debugging string of the command invoked for -00133 * this process [only present if APR_HAS_PROC_INVOKED is true] -00134 * @remark Only enabled on Win32 by default. -00135 * @bug This should either always or never be present in release -00136 * builds - since it breaks binary compatibility. We may enable -00137 * it always in APR 1.0 yet leave it undefined in most cases. -00138 */ -00139 char *invoked; -00140 #endif -00141 #if defined(WIN32) || defined(DOXYGEN) -00142 /** (Win32 only) Creator's handle granting access to the process -00143 * @remark This handle is closed and reset to NULL in every case -00144 * corresponding to a waitpid() on Unix which returns the exit status. -00145 * Therefore Win32 correspond's to Unix's zombie reaping characteristics -00146 * and avoids potential handle leaks. -00147 */ -00148 HANDLE hproc; -00149 #endif -00150 } apr_proc_t; -00151 -00152 /** -00153 * The prototype for APR child errfn functions. (See the description -00154 * of apr_procattr_child_errfn_set() for more information.) -00155 * It is passed the following parameters: -00156 * @param pool Pool associated with the apr_proc_t. If your child -00157 * error function needs user data, associate it with this -00158 * pool. -00159 * @param err APR error code describing the error -00160 * @param description Text description of type of processing which failed -00161 */ -00162 typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err, -00163 const char *description); -00164 -00165 /** Opaque Thread structure. */ -00166 typedef struct apr_thread_t apr_thread_t; -00167 -00168 /** Opaque Thread attributes structure. */ -00169 typedef struct apr_threadattr_t apr_threadattr_t; -00170 -00171 /** Opaque Process attributes structure. */ -00172 typedef struct apr_procattr_t apr_procattr_t; -00173 -00174 /** Opaque control variable for one-time atomic variables. */ -00175 typedef struct apr_thread_once_t apr_thread_once_t; -00176 -00177 /** Opaque thread private address space. */ -00178 typedef struct apr_threadkey_t apr_threadkey_t; -00179 -00180 /** Opaque record of child process. */ -00181 typedef struct apr_other_child_rec_t apr_other_child_rec_t; -00182 -00183 /** -00184 * The prototype for any APR thread worker functions. -00185 */ -00186 typedef void *(APR_THREAD_FUNC *apr_thread_start_t)(apr_thread_t*, void*); -00187 -00188 typedef enum { -00189 APR_KILL_NEVER, /**< process is never sent any signals */ -00190 APR_KILL_ALWAYS, /**< process is sent SIGKILL on apr_pool_t cleanup */ -00191 APR_KILL_AFTER_TIMEOUT, /**< SIGTERM, wait 3 seconds, SIGKILL */ -00192 APR_JUST_WAIT, /**< wait forever for the process to complete */ -00193 APR_KILL_ONLY_ONCE /**< send SIGTERM and then wait */ -00194 } apr_kill_conditions_e; -00195 -00196 /* Thread Function definitions */ -00197 -00198 #if APR_HAS_THREADS -00199 -00200 /** -00201 * Create and initialize a new threadattr variable -00202 * @param new_attr The newly created threadattr. -00203 * @param cont The pool to use -00204 */ -00205 APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new_attr, -00206 apr_pool_t *cont); -00207 -00208 /** -00209 * Set if newly created threads should be created in detached state. -00210 * @param attr The threadattr to affect -00211 * @param on Non-zero if detached threads should be created. -00212 */ -00213 APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr, -00214 apr_int32_t on); -00215 -00216 /** -00217 * Get the detach state for this threadattr. -00218 * @param attr The threadattr to reference -00219 * @return APR_DETACH if threads are to be detached, or APR_NOTDETACH -00220 * if threads are to be joinable. -00221 */ -00222 APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr); -00223 -00224 /** -00225 * Set the stack size of newly created threads. -00226 * @param attr The threadattr to affect -00227 * @param stacksize The stack size in bytes -00228 */ -00229 APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr, -00230 apr_size_t stacksize); -00231 -00232 /** -00233 * Set the stack guard area size of newly created threads. -00234 * @param attr The threadattr to affect -00235 * @param guardsize The stack guard area size in bytes -00236 * @note Thread library implementations commonly use a "guard area" -00237 * after each thread's stack which is not readable or writable such that -00238 * stack overflows cause a segfault; this consumes e.g. 4K of memory -00239 * and increases memory management overhead. Setting the guard area -00240 * size to zero hence trades off reliable behaviour on stack overflow -00241 * for performance. */ -00242 APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, -00243 apr_size_t guardsize); -00244 -00245 /** -00246 * Create a new thread of execution -00247 * @param new_thread The newly created thread handle. -00248 * @param attr The threadattr to use to determine how to create the thread -00249 * @param func The function to start the new thread in -00250 * @param data Any data to be passed to the starting function -00251 * @param cont The pool to use -00252 */ -00253 APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new_thread, -00254 apr_threadattr_t *attr, -00255 apr_thread_start_t func, -00256 void *data, apr_pool_t *cont); -00257 -00258 /** -00259 * stop the current thread -00260 * @param thd The thread to stop -00261 * @param retval The return value to pass back to any thread that cares -00262 */ -00263 APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, -00264 apr_status_t retval); -00265 -00266 /** -00267 * block until the desired thread stops executing. -00268 * @param retval The return value from the dead thread. -00269 * @param thd The thread to join -00270 */ -00271 APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval, -00272 apr_thread_t *thd); -00273 -00274 /** -00275 * force the current thread to yield the processor -00276 */ -00277 APR_DECLARE(void) apr_thread_yield(void); -00278 -00279 /** -00280 * Initialize the control variable for apr_thread_once. If this isn't -00281 * called, apr_initialize won't work. -00282 * @param control The control variable to initialize -00283 * @param p The pool to allocate data from. -00284 */ -00285 APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control, -00286 apr_pool_t *p); -00287 -00288 /** -00289 * Run the specified function one time, regardless of how many threads -00290 * call it. -00291 * @param control The control variable. The same variable should -00292 * be passed in each time the function is tried to be -00293 * called. This is how the underlying functions determine -00294 * if the function has ever been called before. -00295 * @param func The function to call. -00296 */ -00297 APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control, -00298 void (*func)(void)); -00299 -00300 /** -00301 * detach a thread -00302 * @param thd The thread to detach -00303 */ -00304 APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd); -00305 -00306 /** -00307 * Return the pool associated with the current thread. -00308 * @param data The user data associated with the thread. -00309 * @param key The key to associate with the data -00310 * @param thread The currently open thread. -00311 */ -00312 APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key, -00313 apr_thread_t *thread); -00314 -00315 /** -00316 * Return the pool associated with the current thread. -00317 * @param data The user data to associate with the thread. -00318 * @param key The key to use for associating the data with the thread -00319 * @param cleanup The cleanup routine to use when the thread is destroyed. -00320 * @param thread The currently open thread. -00321 */ -00322 APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key, -00323 apr_status_t (*cleanup) (void *), +00080 /** @see apr_procattr_io_set and apr_file_pipe_create_ex */ +00081 #define APR_FULL_BLOCK 1 +00082 /** @see apr_procattr_io_set and apr_file_pipe_create_ex */ +00083 #define APR_FULL_NONBLOCK 2 +00084 /** @see apr_procattr_io_set */ +00085 #define APR_PARENT_BLOCK 3 +00086 /** @see apr_procattr_io_set */ +00087 #define APR_CHILD_BLOCK 4 +00088 /** @see apr_procattr_io_set */ +00089 #define APR_NO_FILE 8 +00090 +00091 /** @see apr_file_pipe_create_ex */ +00092 #define APR_READ_BLOCK 3 +00093 /** @see apr_file_pipe_create_ex */ +00094 #define APR_WRITE_BLOCK 4 +00095 +00096 /** @see apr_procattr_io_set +00097 * @note Win32 only effective with version 1.2.12, portably introduced in 1.3.0 +00098 */ +00099 #define APR_NO_FILE 8 +00100 +00101 /** @see apr_procattr_limit_set */ +00102 #define APR_LIMIT_CPU 0 +00103 /** @see apr_procattr_limit_set */ +00104 #define APR_LIMIT_MEM 1 +00105 /** @see apr_procattr_limit_set */ +00106 #define APR_LIMIT_NPROC 2 +00107 /** @see apr_procattr_limit_set */ +00108 #define APR_LIMIT_NOFILE 3 +00109 +00110 /** +00111 * @defgroup APR_OC Other Child Flags +00112 * @{ +00113 */ +00114 #define APR_OC_REASON_DEATH 0 /**< child has died, caller must call +00115 * unregister still */ +00116 #define APR_OC_REASON_UNWRITABLE 1 /**< write_fd is unwritable */ +00117 #define APR_OC_REASON_RESTART 2 /**< a restart is occuring, perform +00118 * any necessary cleanup (including +00119 * sending a special signal to child) +00120 */ +00121 #define APR_OC_REASON_UNREGISTER 3 /**< unregister has been called, do +00122 * whatever is necessary (including +00123 * kill the child) */ +00124 #define APR_OC_REASON_LOST 4 /**< somehow the child exited without +00125 * us knowing ... buggy os? */ +00126 #define APR_OC_REASON_RUNNING 5 /**< a health check is occuring, +00127 * for most maintainence functions +00128 * this is a no-op. +00129 */ +00130 /** @} */ +00131 +00132 /** The APR process type */ +00133 typedef struct apr_proc_t { +00134 /** The process ID */ +00135 pid_t pid; +00136 /** Parent's side of pipe to child's stdin */ +00137 apr_file_t *in; +00138 /** Parent's side of pipe to child's stdout */ +00139 apr_file_t *out; +00140 /** Parent's side of pipe to child's stdouterr */ +00141 apr_file_t *err; +00142 #if APR_HAS_PROC_INVOKED || defined(DOXYGEN) +00143 /** Diagnositics/debugging string of the command invoked for +00144 * this process [only present if APR_HAS_PROC_INVOKED is true] +00145 * @remark Only enabled on Win32 by default. +00146 * @bug This should either always or never be present in release +00147 * builds - since it breaks binary compatibility. We may enable +00148 * it always in APR 1.0 yet leave it undefined in most cases. +00149 */ +00150 char *invoked; +00151 #endif +00152 #if defined(WIN32) || defined(DOXYGEN) +00153 /** (Win32 only) Creator's handle granting access to the process +00154 * @remark This handle is closed and reset to NULL in every case +00155 * corresponding to a waitpid() on Unix which returns the exit status. +00156 * Therefore Win32 correspond's to Unix's zombie reaping characteristics +00157 * and avoids potential handle leaks. +00158 */ +00159 HANDLE hproc; +00160 #endif +00161 } apr_proc_t; +00162 +00163 /** +00164 * The prototype for APR child errfn functions. (See the description +00165 * of apr_procattr_child_errfn_set() for more information.) +00166 * It is passed the following parameters: +00167 * @param pool Pool associated with the apr_proc_t. If your child +00168 * error function needs user data, associate it with this +00169 * pool. +00170 * @param err APR error code describing the error +00171 * @param description Text description of type of processing which failed +00172 */ +00173 typedef void (apr_child_errfn_t)(apr_pool_t *proc, apr_status_t err, +00174 const char *description); +00175 +00176 /** Opaque Thread structure. */ +00177 typedef struct apr_thread_t apr_thread_t; +00178 +00179 /** Opaque Thread attributes structure. */ +00180 typedef struct apr_threadattr_t apr_threadattr_t; +00181 +00182 /** Opaque Process attributes structure. */ +00183 typedef struct apr_procattr_t apr_procattr_t; +00184 +00185 /** Opaque control variable for one-time atomic variables. */ +00186 typedef struct apr_thread_once_t apr_thread_once_t; +00187 +00188 /** Opaque thread private address space. */ +00189 typedef struct apr_threadkey_t apr_threadkey_t; +00190 +00191 /** Opaque record of child process. */ +00192 typedef struct apr_other_child_rec_t apr_other_child_rec_t; +00193 +00194 /** +00195 * The prototype for any APR thread worker functions. +00196 */ +00197 typedef void *(APR_THREAD_FUNC *apr_thread_start_t)(apr_thread_t*, void*); +00198 +00199 typedef enum { +00200 APR_KILL_NEVER, /**< process is never sent any signals */ +00201 APR_KILL_ALWAYS, /**< process is sent SIGKILL on apr_pool_t cleanup */ +00202 APR_KILL_AFTER_TIMEOUT, /**< SIGTERM, wait 3 seconds, SIGKILL */ +00203 APR_JUST_WAIT, /**< wait forever for the process to complete */ +00204 APR_KILL_ONLY_ONCE /**< send SIGTERM and then wait */ +00205 } apr_kill_conditions_e; +00206 +00207 /* Thread Function definitions */ +00208 +00209 #if APR_HAS_THREADS +00210 +00211 /** +00212 * Create and initialize a new threadattr variable +00213 * @param new_attr The newly created threadattr. +00214 * @param cont The pool to use +00215 */ +00216 APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new_attr, +00217 apr_pool_t *cont); +00218 +00219 /** +00220 * Set if newly created threads should be created in detached state. +00221 * @param attr The threadattr to affect +00222 * @param on Non-zero if detached threads should be created. +00223 */ +00224 APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr, +00225 apr_int32_t on); +00226 +00227 /** +00228 * Get the detach state for this threadattr. +00229 * @param attr The threadattr to reference +00230 * @return APR_DETACH if threads are to be detached, or APR_NOTDETACH +00231 * if threads are to be joinable. +00232 */ +00233 APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr); +00234 +00235 /** +00236 * Set the stack size of newly created threads. +00237 * @param attr The threadattr to affect +00238 * @param stacksize The stack size in bytes +00239 */ +00240 APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr, +00241 apr_size_t stacksize); +00242 +00243 /** +00244 * Set the stack guard area size of newly created threads. +00245 * @param attr The threadattr to affect +00246 * @param guardsize The stack guard area size in bytes +00247 * @note Thread library implementations commonly use a "guard area" +00248 * after each thread's stack which is not readable or writable such that +00249 * stack overflows cause a segfault; this consumes e.g. 4K of memory +00250 * and increases memory management overhead. Setting the guard area +00251 * size to zero hence trades off reliable behaviour on stack overflow +00252 * for performance. */ +00253 APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, +00254 apr_size_t guardsize); +00255 +00256 /** +00257 * Create a new thread of execution +00258 * @param new_thread The newly created thread handle. +00259 * @param attr The threadattr to use to determine how to create the thread +00260 * @param func The function to start the new thread in +00261 * @param data Any data to be passed to the starting function +00262 * @param cont The pool to use +00263 */ +00264 APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new_thread, +00265 apr_threadattr_t *attr, +00266 apr_thread_start_t func, +00267 void *data, apr_pool_t *cont); +00268 +00269 /** +00270 * stop the current thread +00271 * @param thd The thread to stop +00272 * @param retval The return value to pass back to any thread that cares +00273 */ +00274 APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, +00275 apr_status_t retval); +00276 +00277 /** +00278 * block until the desired thread stops executing. +00279 * @param retval The return value from the dead thread. +00280 * @param thd The thread to join +00281 */ +00282 APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval, +00283 apr_thread_t *thd); +00284 +00285 /** +00286 * force the current thread to yield the processor +00287 */ +00288 APR_DECLARE(void) apr_thread_yield(void); +00289 +00290 /** +00291 * Initialize the control variable for apr_thread_once. If this isn't +00292 * called, apr_initialize won't work. +00293 * @param control The control variable to initialize +00294 * @param p The pool to allocate data from. +00295 */ +00296 APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control, +00297 apr_pool_t *p); +00298 +00299 /** +00300 * Run the specified function one time, regardless of how many threads +00301 * call it. +00302 * @param control The control variable. The same variable should +00303 * be passed in each time the function is tried to be +00304 * called. This is how the underlying functions determine +00305 * if the function has ever been called before. +00306 * @param func The function to call. +00307 */ +00308 APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control, +00309 void (*func)(void)); +00310 +00311 /** +00312 * detach a thread +00313 * @param thd The thread to detach +00314 */ +00315 APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd); +00316 +00317 /** +00318 * Return the pool associated with the current thread. +00319 * @param data The user data associated with the thread. +00320 * @param key The key to associate with the data +00321 * @param thread The currently open thread. +00322 */ +00323 APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key, 00324 apr_thread_t *thread); 00325 00326 /** -00327 * Create and initialize a new thread private address space -00328 * @param key The thread private handle. -00329 * @param dest The destructor to use when freeing the private memory. -00330 * @param cont The pool to use -00331 */ -00332 APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key, -00333 void (*dest)(void *), -00334 apr_pool_t *cont); -00335 -00336 /** -00337 * Get a pointer to the thread private memory -00338 * @param new_mem The data stored in private memory -00339 * @param key The handle for the desired thread private memory -00340 */ -00341 APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new_mem, -00342 apr_threadkey_t *key); -00343 -00344 /** -00345 * Set the data to be stored in thread private memory -00346 * @param priv The data to be stored in private memory -00347 * @param key The handle for the desired thread private memory -00348 */ -00349 APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv, -00350 apr_threadkey_t *key); -00351 -00352 /** -00353 * Free the thread private memory -00354 * @param key The handle for the desired thread private memory -00355 */ -00356 APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key); -00357 -00358 /** -00359 * Return the pool associated with the current threadkey. -00360 * @param data The user data associated with the threadkey. -00361 * @param key The key associated with the data -00362 * @param threadkey The currently open threadkey. -00363 */ -00364 APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key, -00365 apr_threadkey_t *threadkey); -00366 -00367 /** -00368 * Return the pool associated with the current threadkey. -00369 * @param data The data to set. -00370 * @param key The key to associate with the data. -00371 * @param cleanup The cleanup routine to use when the file is destroyed. -00372 * @param threadkey The currently open threadkey. -00373 */ -00374 APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key, -00375 apr_status_t (*cleanup) (void *), +00327 * Return the pool associated with the current thread. +00328 * @param data The user data to associate with the thread. +00329 * @param key The key to use for associating the data with the thread +00330 * @param cleanup The cleanup routine to use when the thread is destroyed. +00331 * @param thread The currently open thread. +00332 */ +00333 APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key, +00334 apr_status_t (*cleanup) (void *), +00335 apr_thread_t *thread); +00336 +00337 /** +00338 * Create and initialize a new thread private address space +00339 * @param key The thread private handle. +00340 * @param dest The destructor to use when freeing the private memory. +00341 * @param cont The pool to use +00342 */ +00343 APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key, +00344 void (*dest)(void *), +00345 apr_pool_t *cont); +00346 +00347 /** +00348 * Get a pointer to the thread private memory +00349 * @param new_mem The data stored in private memory +00350 * @param key The handle for the desired thread private memory +00351 */ +00352 APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new_mem, +00353 apr_threadkey_t *key); +00354 +00355 /** +00356 * Set the data to be stored in thread private memory +00357 * @param priv The data to be stored in private memory +00358 * @param key The handle for the desired thread private memory +00359 */ +00360 APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv, +00361 apr_threadkey_t *key); +00362 +00363 /** +00364 * Free the thread private memory +00365 * @param key The handle for the desired thread private memory +00366 */ +00367 APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key); +00368 +00369 /** +00370 * Return the pool associated with the current threadkey. +00371 * @param data The user data associated with the threadkey. +00372 * @param key The key associated with the data +00373 * @param threadkey The currently open threadkey. +00374 */ +00375 APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key, 00376 apr_threadkey_t *threadkey); -00377 -00378 #endif -00379 -00380 /** -00381 * Create and initialize a new procattr variable -00382 * @param new_attr The newly created procattr. -00383 * @param cont The pool to use +00377 +00378 /** +00379 * Return the pool associated with the current threadkey. +00380 * @param data The data to set. +00381 * @param key The key to associate with the data. +00382 * @param cleanup The cleanup routine to use when the file is destroyed. +00383 * @param threadkey The currently open threadkey. 00384 */ -00385 APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new_attr, -00386 apr_pool_t *cont); -00387 -00388 /** -00389 * Determine if any of stdin, stdout, or stderr should be linked to pipes -00390 * when starting a child process. -00391 * @param attr The procattr we care about. -00392 * @param in Should stdin be a pipe back to the parent? -00393 * @param out Should stdout be a pipe back to the parent? -00394 * @param err Should stderr be a pipe back to the parent? +00385 APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key, +00386 apr_status_t (*cleanup) (void *), +00387 apr_threadkey_t *threadkey); +00388 +00389 #endif +00390 +00391 /** +00392 * Create and initialize a new procattr variable +00393 * @param new_attr The newly created procattr. +00394 * @param cont The pool to use 00395 */ -00396 APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, -00397 apr_int32_t in, apr_int32_t out, -00398 apr_int32_t err); -00399 -00400 /** -00401 * Set the child_in and/or parent_in values to existing apr_file_t values. +00396 APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new_attr, +00397 apr_pool_t *cont); +00398 +00399 /** +00400 * Determine if any of stdin, stdout, or stderr should be linked to pipes +00401 * when starting a child process. 00402 * @param attr The procattr we care about. -00403 * @param child_in apr_file_t value to use as child_in. Must be a valid file. -00404 * @param parent_in apr_file_t value to use as parent_in. Must be a valid file. -00405 * @remark This is NOT a required initializer function. This is -00406 * useful if you have already opened a pipe (or multiple files) -00407 * that you wish to use, perhaps persistently across multiple -00408 * process invocations - such as a log file. You can save some -00409 * extra function calls by not creating your own pipe since this -00410 * creates one in the process space for you. -00411 */ -00412 APR_DECLARE(apr_status_t) apr_procattr_child_in_set(struct apr_procattr_t *attr, -00413 apr_file_t *child_in, -00414 apr_file_t *parent_in); [... 806 lines stripped ...]