⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apr__portable_8h-source.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
00167 <span class="keyword">typedef</span> NSModule              <a class="code" href="group__apr__portabile.html#ga7">apr_os_dso_handle_t</a>;
00168 <span class="preprocessor">#else</span>
<a name="l00169"></a><a class="code" href="group__apr__portabile.html#ga7">00169</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">void</span> *                <a class="code" href="group__apr__portabile.html#ga7">apr_os_dso_handle_t</a>;
00170 <span class="preprocessor">#endif</span>
<a name="l00171"></a><a class="code" href="group__apr__portabile.html#ga8">00171</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">void</span>*                 <a class="code" href="group__apr__portabile.html#ga8">apr_os_shm_t</a>;         <span class="comment">/**&lt; native SHM */</span>
00172 
00173 <span class="preprocessor">#endif</span>
00174 <span class="preprocessor"></span><span class="comment"></span>
00175 <span class="comment">/**</span>
00176 <span class="comment"> * @typedef apr_os_sock_info_t</span>
00177 <span class="comment"> * @brief alias for local OS socket</span>
00178 <span class="comment"> */</span><span class="comment"></span>
00179 <span class="comment">/**</span>
00180 <span class="comment"> * everything APR needs to know about an active socket to construct</span>
00181 <span class="comment"> * an APR socket from it; currently, this is platform-independent</span>
00182 <span class="comment"> */</span>
<a name="l00183"></a><a class="code" href="structapr__os__sock__info__t.html">00183</a> <span class="keyword">struct </span><a class="code" href="structapr__os__sock__info__t.html">apr_os_sock_info_t</a> {
<a name="l00184"></a><a class="code" href="structapr__os__sock__info__t.html#o0">00184</a>     <a class="code" href="group__apr__portabile.html#ga2">apr_os_sock_t</a> *<a class="code" href="structapr__os__sock__info__t.html#o0">os_sock</a>; <span class="comment">/**&lt; always required */</span>
<a name="l00185"></a><a class="code" href="structapr__os__sock__info__t.html#o1">00185</a>     <span class="keyword">struct </span>sockaddr *<a class="code" href="structapr__os__sock__info__t.html#o1">local</a>; <span class="comment">/**&lt; NULL if not yet bound */</span>
<a name="l00186"></a><a class="code" href="structapr__os__sock__info__t.html#o2">00186</a>     <span class="keyword">struct </span>sockaddr *<a class="code" href="structapr__os__sock__info__t.html#o2">remote</a>; <span class="comment">/**&lt; NULL if not connected */</span>
<a name="l00187"></a><a class="code" href="structapr__os__sock__info__t.html#o3">00187</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__os__sock__info__t.html#o3">family</a>;             <span class="comment">/**&lt; always required (APR_INET, APR_INET6, etc.) */</span>
<a name="l00188"></a><a class="code" href="structapr__os__sock__info__t.html#o4">00188</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__os__sock__info__t.html#o4">type</a>;               <span class="comment">/**&lt; always required (SOCK_STREAM, SOCK_DGRAM, etc.) */</span>
<a name="l00189"></a><a class="code" href="structapr__os__sock__info__t.html#o5">00189</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__os__sock__info__t.html#o5">protocol</a>;           <span class="comment">/**&lt; 0 or actual protocol (APR_PROTO_SCTP, APR_PROTO_TCP, etc.) */</span>
00190 };
00191 
<a name="l00192"></a><a class="code" href="group__apr__portabile.html#ga9">00192</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__os__sock__info__t.html">apr_os_sock_info_t</a> <a class="code" href="group__apr__portabile.html#ga9">apr_os_sock_info_t</a>;
00193 
00194 <span class="preprocessor">#if APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)</span>
00195 <span class="preprocessor"></span><span class="comment">/** Opaque global mutex type */</span>
<a name="l00196"></a><a class="code" href="group__apr__portabile.html#ga29">00196</a> <span class="preprocessor">#define apr_os_global_mutex_t apr_os_proc_mutex_t</span>
00197 <span class="preprocessor"></span><span class="comment">/** @return apr_os_global_mutex */</span>
<a name="l00198"></a><a class="code" href="group__apr__portabile.html#ga30">00198</a> <span class="preprocessor">#define apr_os_global_mutex_get apr_os_proc_mutex_get</span>
00199 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00200 <span class="preprocessor"></span><span class="comment">    /** Thread and process mutex for those platforms where process mutexes</span>
00201 <span class="comment">     *  are not held in threads.</span>
00202 <span class="comment">     */</span>
00203     <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga29">apr_os_global_mutex_t</a> {
00204         <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool;
00205         <a class="code" href="group__apr__proc__mutex.html#ga0">apr_proc_mutex_t</a> *proc_mutex;
00206 <span class="preprocessor">#if APR_HAS_THREADS</span>
00207 <span class="preprocessor"></span>        <a class="code" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *thread_mutex;
00208 <span class="preprocessor">#endif </span><span class="comment">/* APR_HAS_THREADS */</span>
00209     };
00210     <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga29">apr_os_global_mutex_t</a> <a class="code" href="group__apr__portabile.html#ga29">apr_os_global_mutex_t</a>;
00211 
00212 APR_DECLARE(apr_status_t) apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex, 
00213                                                 apr_global_mutex_t *pmutex);
00214 #endif
00215 
00216 <span class="comment"></span>
00217 <span class="comment">/**</span>
00218 <span class="comment"> * convert the file from apr type to os specific type.</span>
00219 <span class="comment"> * @param thefile The os specific file we are converting to</span>
00220 <span class="comment"> * @param file The apr file to convert.</span>
00221 <span class="comment"> * @remark On Unix, it is only possible to get a file descriptor from </span>
00222 <span class="comment"> *         an apr file type.</span>
00223 <span class="comment"> */</span>
00224 APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
00225                                           apr_file_t *file);
00226 <span class="comment"></span>
00227 <span class="comment">/**</span>
00228 <span class="comment"> * convert the dir from apr type to os specific type.</span>
00229 <span class="comment"> * @param thedir The os specific dir we are converting to</span>
00230 <span class="comment"> * @param dir The apr dir to convert.</span>
00231 <span class="comment"> */</span>   
00232 APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir, 
00233                                          apr_dir_t *dir);
00234 <span class="comment"></span>
00235 <span class="comment">/**</span>
00236 <span class="comment"> * Convert the socket from an apr type to an OS specific socket</span>
00237 <span class="comment"> * @param thesock The socket to convert.</span>
00238 <span class="comment"> * @param sock The os specifc equivelant of the apr socket..</span>
00239 <span class="comment"> */</span>
00240 APR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock,
00241                                           apr_socket_t *sock);
00242 <span class="comment"></span>
00243 <span class="comment">/**</span>
00244 <span class="comment"> * Convert the proc mutex from os specific type to apr type</span>
00245 <span class="comment"> * @param ospmutex The os specific proc mutex we are converting to.</span>
00246 <span class="comment"> * @param pmutex The apr proc mutex to convert.</span>
00247 <span class="comment"> */</span>
00248 APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, 
00249                                                 apr_proc_mutex_t *pmutex);
00250 <span class="comment"></span>
00251 <span class="comment">/**</span>
00252 <span class="comment"> * Get the exploded time in the platforms native format.</span>
00253 <span class="comment"> * @param ostime the native time format</span>
00254 <span class="comment"> * @param aprtime the time to convert</span>
00255 <span class="comment"> */</span>
00256 APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,
00257                                  <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *aprtime);
00258 <span class="comment"></span>
00259 <span class="comment">/**</span>
00260 <span class="comment"> * Get the imploded time in the platforms native format.</span>
00261 <span class="comment"> * @param ostime  the native time format</span>
00262 <span class="comment"> * @param aprtime the time to convert</span>
00263 <span class="comment"> */</span>
00264 APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime, 
00265                                               apr_time_t *aprtime);
00266 <span class="comment"></span>
00267 <span class="comment">/**</span>
00268 <span class="comment"> * convert the shm from apr type to os specific type.</span>
00269 <span class="comment"> * @param osshm The os specific shm representation</span>
00270 <span class="comment"> * @param shm The apr shm to convert.</span>
00271 <span class="comment"> */</span>   
00272 APR_DECLARE(apr_status_t) apr_os_shm_get(apr_os_shm_t *osshm,
00273                                          <a class="code" href="group__apr__shm.html#ga0">apr_shm_t</a> *shm);
00274 
00275 #if APR_HAS_THREADS || defined(DOXYGEN)<span class="comment"></span>
00276 <span class="comment">/** </span>
00277 <span class="comment"> * @defgroup apr_os_thread Thread portability Routines</span>
00278 <span class="comment"> * @{ </span>
00279 <span class="comment"> */</span><span class="comment"></span>
00280 <span class="comment">/**</span>
00281 <span class="comment"> * convert the thread to os specific type from apr type.</span>
00282 <span class="comment"> * @param thethd The apr thread to convert</span>
00283 <span class="comment"> * @param thd The os specific thread we are converting to</span>
00284 <span class="comment"> */</span>
00285 APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, 
00286                                             <a class="code" href="group__apr__thread__proc.html#ga2">apr_thread_t</a> *thd);
00287 <span class="comment"></span>
00288 <span class="comment">/**</span>
00289 <span class="comment"> * convert the thread private memory key to os specific type from an apr type.</span>
00290 <span class="comment"> * @param thekey The apr handle we are converting from.</span>
00291 <span class="comment"> * @param key The os specific handle we are converting to.</span>
00292 <span class="comment"> */</span>
00293 APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,
00294                                                <a class="code" href="group__apr__thread__proc.html#ga6">apr_threadkey_t</a> *key);
00295 <span class="comment"></span>
00296 <span class="comment">/**</span>
00297 <span class="comment"> * convert the thread from os specific type to apr type.</span>
00298 <span class="comment"> * @param thd The apr thread we are converting to.</span>
00299 <span class="comment"> * @param thethd The os specific thread to convert</span>
00300 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00301 <span class="comment"> */</span>
00302 APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd,
00303                                             apr_os_thread_t *thethd,
00304                                             apr_pool_t *cont);
00305 <span class="comment"></span>
00306 <span class="comment">/**</span>
00307 <span class="comment"> * convert the thread private memory key from os specific type to apr type.</span>
00308 <span class="comment"> * @param key The apr handle we are converting to.</span>
00309 <span class="comment"> * @param thekey The os specific handle to convert</span>
00310 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00311 <span class="comment"> */</span>
00312 APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
00313                                                apr_os_threadkey_t *thekey,
00314                                                apr_pool_t *cont);<span class="comment"></span>
00315 <span class="comment">/**</span>
00316 <span class="comment"> * Get the thread ID</span>
00317 <span class="comment"> */</span>
00318 APR_DECLARE(apr_os_thread_t) apr_os_thread_current(<span class="keywordtype">void</span>);
00319 <span class="comment"></span>
00320 <span class="comment">/**</span>
00321 <span class="comment"> * Compare two thread id's</span>
00322 <span class="comment"> * @param tid1 1st Thread ID to compare</span>
00323 <span class="comment"> * @param tid2 2nd Thread ID to compare</span>
00324 <span class="comment"> */</span> 
00325 APR_DECLARE(<span class="keywordtype">int</span>) apr_os_thread_equal(apr_os_thread_t tid1, 
00326                                      apr_os_thread_t tid2);
00327 <span class="comment"></span>
00328 <span class="comment">/** @} */</span>
00329 #endif <span class="comment">/* APR_HAS_THREADS */</span>
00330 <span class="comment"></span>
00331 <span class="comment">/**</span>
00332 <span class="comment"> * convert the file from os specific type to apr type.</span>
00333 <span class="comment"> * @param file The apr file we are converting to.</span>
00334 <span class="comment"> * @param thefile The os specific file to convert</span>
00335 <span class="comment"> * @param flags The flags that were used to open this file.</span>
00336 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00337 <span class="comment"> * @remark On Unix, it is only possible to put a file descriptor into</span>
00338 <span class="comment"> *         an apr file type.</span>
00339 <span class="comment"> */</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -