📄 apr__thread__proc_8h-source.html
字号:
00298 <span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>));
00299 <span class="comment"></span>
00300 <span class="comment">/**</span>
00301 <span class="comment"> * detach a thread</span>
00302 <span class="comment"> * @param thd The thread to detach </span>
00303 <span class="comment"> */</span>
00304 APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd);
00305 <span class="comment"></span>
00306 <span class="comment">/**</span>
00307 <span class="comment"> * Return the pool associated with the current thread.</span>
00308 <span class="comment"> * @param data The user data associated with the thread.</span>
00309 <span class="comment"> * @param key The key to associate with the data</span>
00310 <span class="comment"> * @param thread The currently open thread.</span>
00311 <span class="comment"> */</span>
00312 APR_DECLARE(apr_status_t) apr_thread_data_get(<span class="keywordtype">void</span> **data, const <span class="keywordtype">char</span> *key,
00313 apr_thread_t *thread);
00314 <span class="comment"></span>
00315 <span class="comment">/**</span>
00316 <span class="comment"> * Return the pool associated with the current thread.</span>
00317 <span class="comment"> * @param data The user data to associate with the thread.</span>
00318 <span class="comment"> * @param key The key to use for associating the data with the tread</span>
00319 <span class="comment"> * @param cleanup The cleanup routine to use when the thread is destroyed.</span>
00320 <span class="comment"> * @param thread The currently open thread.</span>
00321 <span class="comment"> */</span>
00322 APR_DECLARE(apr_status_t) apr_thread_data_set(<span class="keywordtype">void</span> *data, const <span class="keywordtype">char</span> *key,
00323 apr_status_t (*cleanup) (<span class="keywordtype">void</span> *),
00324 apr_thread_t *thread);
00325 <span class="comment"></span>
00326 <span class="comment">/**</span>
00327 <span class="comment"> * Create and initialize a new thread private address space</span>
00328 <span class="comment"> * @param key The thread private handle.</span>
00329 <span class="comment"> * @param dest The destructor to use when freeing the private memory.</span>
00330 <span class="comment"> * @param cont The pool to use</span>
00331 <span class="comment"> */</span>
00332 APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
00333 <span class="keywordtype">void</span> (*dest)(<span class="keywordtype">void</span> *),
00334 apr_pool_t *cont);
00335 <span class="comment"></span>
00336 <span class="comment">/**</span>
00337 <span class="comment"> * Get a pointer to the thread private memory</span>
00338 <span class="comment"> * @param new_mem The data stored in private memory </span>
00339 <span class="comment"> * @param key The handle for the desired thread private memory </span>
00340 <span class="comment"> */</span>
00341 APR_DECLARE(apr_status_t) apr_threadkey_private_get(<span class="keywordtype">void</span> **new_mem,
00342 apr_threadkey_t *key);
00343 <span class="comment"></span>
00344 <span class="comment">/**</span>
00345 <span class="comment"> * Set the data to be stored in thread private memory</span>
00346 <span class="comment"> * @param priv The data to be stored in private memory </span>
00347 <span class="comment"> * @param key The handle for the desired thread private memory </span>
00348 <span class="comment"> */</span>
00349 APR_DECLARE(apr_status_t) apr_threadkey_private_set(<span class="keywordtype">void</span> *priv,
00350 apr_threadkey_t *key);
00351 <span class="comment"></span>
00352 <span class="comment">/**</span>
00353 <span class="comment"> * Free the thread private memory</span>
00354 <span class="comment"> * @param key The handle for the desired thread private memory </span>
00355 <span class="comment"> */</span>
00356 APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key);
00357 <span class="comment"></span>
00358 <span class="comment">/**</span>
00359 <span class="comment"> * Return the pool associated with the current threadkey.</span>
00360 <span class="comment"> * @param data The user data associated with the threadkey.</span>
00361 <span class="comment"> * @param key The key associated with the data</span>
00362 <span class="comment"> * @param threadkey The currently open threadkey.</span>
00363 <span class="comment"> */</span>
00364 APR_DECLARE(apr_status_t) apr_threadkey_data_get(<span class="keywordtype">void</span> **data, const <span class="keywordtype">char</span> *key,
00365 apr_threadkey_t *threadkey);
00366 <span class="comment"></span>
00367 <span class="comment">/**</span>
00368 <span class="comment"> * Return the pool associated with the current threadkey.</span>
00369 <span class="comment"> * @param data The data to set.</span>
00370 <span class="comment"> * @param key The key to associate with the data.</span>
00371 <span class="comment"> * @param cleanup The cleanup routine to use when the file is destroyed.</span>
00372 <span class="comment"> * @param threadkey The currently open threadkey.</span>
00373 <span class="comment"> */</span>
00374 APR_DECLARE(apr_status_t) apr_threadkey_data_set(<span class="keywordtype">void</span> *data, const <span class="keywordtype">char</span> *key,
00375 apr_status_t (*cleanup) (<span class="keywordtype">void</span> *),
00376 apr_threadkey_t *threadkey);
00377
00378 #endif
00379 <span class="comment"></span>
00380 <span class="comment">/**</span>
00381 <span class="comment"> * Create and initialize a new procattr variable</span>
00382 <span class="comment"> * @param new_attr The newly created procattr. </span>
00383 <span class="comment"> * @param cont The pool to use</span>
00384 <span class="comment"> */</span>
00385 APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new_attr,
00386 apr_pool_t *cont);
00387 <span class="comment"></span>
00388 <span class="comment">/**</span>
00389 <span class="comment"> * Determine if any of stdin, stdout, or stderr should be linked to pipes </span>
00390 <span class="comment"> * when starting a child process.</span>
00391 <span class="comment"> * @param attr The procattr we care about. </span>
00392 <span class="comment"> * @param in Should stdin be a pipe back to the parent?</span>
00393 <span class="comment"> * @param out Should stdout be a pipe back to the parent?</span>
00394 <span class="comment"> * @param err Should stderr be a pipe back to the parent?</span>
00395 <span class="comment"> */</span>
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 <span class="comment"></span>
00400 <span class="comment">/**</span>
00401 <span class="comment"> * Set the child_in and/or parent_in values to existing apr_file_t values.</span>
00402 <span class="comment"> * @param attr The procattr we care about. </span>
00403 <span class="comment"> * @param child_in apr_file_t value to use as child_in. Must be a valid file.</span>
00404 <span class="comment"> * @param parent_in apr_file_t value to use as parent_in. Must be a valid file.</span>
00405 <span class="comment"> * @remark This is NOT a required initializer function. This is</span>
00406 <span class="comment"> * useful if you have already opened a pipe (or multiple files)</span>
00407 <span class="comment"> * that you wish to use, perhaps persistently across multiple</span>
00408 <span class="comment"> * process invocations - such as a log file. You can save some </span>
00409 <span class="comment"> * extra function calls by not creating your own pipe since this</span>
00410 <span class="comment"> * creates one in the process space for you.</span>
00411 <span class="comment"> */</span>
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);
00415 <span class="comment"></span>
00416 <span class="comment">/**</span>
00417 <span class="comment"> * Set the child_out and parent_out values to existing apr_file_t values.</span>
00418 <span class="comment"> * @param attr The procattr we care about. </span>
00419 <span class="comment"> * @param child_out apr_file_t value to use as child_out. Must be a valid file.</span>
00420 <span class="comment"> * @param parent_out apr_file_t value to use as parent_out. Must be a valid file.</span>
00421 <span class="comment"> * @remark This is NOT a required initializer function. This is</span>
00422 <span class="comment"> * useful if you have already opened a pipe (or multiple files)</span>
00423 <span class="comment"> * that you wish to use, perhaps persistently across multiple</span>
00424 <span class="comment"> * process invocations - such as a log file. </span>
00425 <span class="comment"> */</span>
00426 APR_DECLARE(apr_status_t) apr_procattr_child_out_set(struct apr_procattr_t *attr,
00427 apr_file_t *child_out,
00428 apr_file_t *parent_out);
00429 <span class="comment"></span>
00430 <span class="comment">/**</span>
00431 <span class="comment"> * Set the child_err and parent_err values to existing apr_file_t values.</span>
00432 <span class="comment"> * @param attr The procattr we care about. </span>
00433 <span class="comment"> * @param child_err apr_file_t value to use as child_err. Must be a valid file.</span>
00434 <span class="comment"> * @param parent_err apr_file_t value to use as parent_err. Must be a valid file.</span>
00435 <span class="comment"> * @remark This is NOT a required initializer function. This is</span>
00436 <span class="comment"> * useful if you have already opened a pipe (or multiple files)</span>
00437 <span class="comment"> * that you wish to use, perhaps persistently across multiple</span>
00438 <span class="comment"> * process invocations - such as a log file. </span>
00439 <span class="comment"> */</span>
00440 APR_DECLARE(apr_status_t) apr_procattr_child_err_set(struct apr_procattr_t *attr,
00441 apr_file_t *child_err,
00442 apr_file_t *parent_err);
00443 <span class="comment"></span>
00444 <span class="comment">/**</span>
00445 <span class="comment"> * Set which directory the child process should start executing in.</span>
00446 <span class="comment"> * @param attr The procattr we care about. </span>
00447 <span class="comment"> * @param dir Which dir to start in. By default, this is the same dir as</span>
00448 <span class="comment"> * the parent currently resides in, when the createprocess call</span>
00449 <span class="comment"> * is made. </span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -