📄 apr_portable.h
字号:
*/APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime, apr_time_exp_t *aprtime);/** * Get the imploded time in the platforms native format. * @param ostime the native time format * @param aprtime the time to convert */APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime);/** * convert the shm from apr type to os specific type. * @param osshm The os specific shm representation * @param shm The apr shm to convert. */ APR_DECLARE(apr_status_t) apr_os_shm_get(apr_os_shm_t *osshm, apr_shm_t *shm);#if APR_HAS_THREADS || defined(DOXYGEN)/** * @defgroup apr_os_thread Thread portability Routines * @{ *//** * convert the thread to os specific type from apr type. * @param thethd The apr thread to convert * @param thd The os specific thread we are converting to */APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd);/** * convert the thread private memory key to os specific type from an apr type. * @param thekey The apr handle we are converting from. * @param key The os specific handle we are converting to. */APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key);/** * convert the thread from os specific type to apr type. * @param thd The apr thread we are converting to. * @param thethd The os specific thread to convert * @param cont The pool to use if it is needed. */APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd, apr_pool_t *cont);/** * convert the thread private memory key from os specific type to apr type. * @param key The apr handle we are converting to. * @param thekey The os specific handle to convert * @param cont The pool to use if it is needed. */APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont);/** * Get the thread ID */APR_DECLARE(apr_os_thread_t) apr_os_thread_current(void);/** * Compare two thread id's * @param tid1 1st Thread ID to compare * @param tid2 2nd Thread ID to compare */ APR_DECLARE(int) apr_os_thread_equal(apr_os_thread_t tid1, apr_os_thread_t tid2);/** @} */#endif /* APR_HAS_THREADS *//** * convert the file from os specific type to apr type. * @param file The apr file we are converting to. * @param thefile The os specific file to convert * @param flags The flags that were used to open this file. * @param cont The pool to use if it is needed. * @remark On Unix, it is only possible to put a file descriptor into * an apr file type. */APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file, apr_os_file_t *thefile, apr_int32_t flags, apr_pool_t *cont); /** * convert the file from os specific type to apr type. * @param file The apr file we are converting to. * @param thefile The os specific pipe to convert * @param cont The pool to use if it is needed. * @remark On Unix, it is only possible to put a file descriptor into * an apr file type. */APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file, apr_os_file_t *thefile, apr_pool_t *cont);/** * convert the file from os specific type to apr type. * @param file The apr file we are converting to. * @param thefile The os specific pipe to convert * @param register_cleanup A cleanup will be registered on the apr_file_t * to issue apr_file_close(). * @param cont The pool to use if it is needed. * @remark On Unix, it is only possible to put a file descriptor into * an apr file type. */APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file, apr_os_file_t *thefile, int register_cleanup, apr_pool_t *cont);/** * convert the dir from os specific type to apr type. * @param dir The apr dir we are converting to. * @param thedir The os specific dir to convert * @param cont The pool to use when creating to apr directory. */APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir, apr_pool_t *cont); /** * Convert a socket from the os specific type to the apr type * @param sock The pool to use. * @param thesock The socket to convert to. * @param cont The socket we are converting to an apr type. * @remark If it is a true socket, it is best to call apr_os_sock_make() * and provide APR with more information about the socket. */APR_DECLARE(apr_status_t) apr_os_sock_put(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont);/** * Create a socket from an existing descriptor and local and remote * socket addresses. * @param apr_sock The new socket that has been set up * @param os_sock_info The os representation of the socket handle and * other characteristics of the socket * @param cont The pool to use * @remark If you only know the descriptor/handle or if it isn't really * a true socket, use apr_os_sock_put() instead. */APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock, apr_os_sock_info_t *os_sock_info, apr_pool_t *cont);/** * Convert the proc mutex from os specific type to apr type * @param pmutex The apr proc mutex we are converting to. * @param ospmutex The os specific proc mutex to convert. * @param cont The pool to use if it is needed. */APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex, apr_os_proc_mutex_t *ospmutex, apr_pool_t *cont); /** * Put the imploded time in the APR format. * @param aprtime the APR time format * @param ostime the time to convert * @param cont the pool to use if necessary */APR_DECLARE(apr_status_t) apr_os_imp_time_put(apr_time_t *aprtime, apr_os_imp_time_t **ostime, apr_pool_t *cont); /** * Put the exploded time in the APR format. * @param aprtime the APR time format * @param ostime the time to convert * @param cont the pool to use if necessary */APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_time_exp_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont); /** * convert the shared memory from os specific type to apr type. * @param shm The apr shm representation of osshm * @param osshm The os specific shm identity * @param cont The pool to use if it is needed. * @remark On fork()ed architectures, this is typically nothing more than * the memory block mapped. On non-fork architectures, this is typically * some internal handle to pass the mapping from process to process. */APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **shm, apr_os_shm_t *osshm, apr_pool_t *cont); #if APR_HAS_DSO || defined(DOXYGEN)/** * @defgroup apr_os_dso DSO (Dynamic Loading) Portabiliity Routines * @{ *//** * convert the dso handle from os specific to apr * @param dso The apr handle we are converting to * @param thedso the os specific handle to convert * @param pool the pool to use if it is needed */APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **dso, apr_os_dso_handle_t thedso, apr_pool_t *pool);/** * convert the apr dso handle into an os specific one * @param aprdso The apr dso handle to convert * @param dso The os specific dso to return */APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso, apr_dso_handle_t *aprdso);#if APR_HAS_OS_UUID/** * Private: apr-util's apr_uuid module when supported by the platform */APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data);#endif/** @} */#endif /* APR_HAS_DSO *//** * Get the name of the system default characer set. * @param pool the pool to allocate the name from, if needed */APR_DECLARE(const char*) apr_os_default_encoding(apr_pool_t *pool);/** * Get the name of the current locale character set. * @param pool the pool to allocate the name from, if needed * @remark Defers to apr_os_default_encoding if the current locale's * data can't be retreved on this system. */APR_DECLARE(const char*) apr_os_locale_encoding(apr_pool_t *pool);/** @} */#ifdef __cplusplus}#endif#endif /* ! APR_PORTABLE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -