Modified: apr/site/trunk/docs/docs/apr/apr__global__mutex_8h-source.html URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__global__mutex_8h-source.html?view=diff&r1=151767&r2=151768 ============================================================================== --- apr/site/trunk/docs/docs/apr/apr__global__mutex_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/apr__global__mutex_8h-source.html Mon Feb 7 15:10:17 2005 @@ -3,162 +3,163 @@ <title>Apache Portable Runtime: apr_global_mutex.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.3.8 --> +<!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> -<h1>apr_global_mutex.h</h1><a href="apr__global__mutex_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span> -00002 <span class="comment"> *</span> -00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> -00004 <span class="comment"> * you may not use this file except in compliance with the License.</span> -00005 <span class="comment"> * You may obtain a copy of the License at</span> -00006 <span class="comment"> *</span> -00007 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> -00008 <span class="comment"> *</span> -00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> -00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> -00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> -00012 <span class="comment"> * See the License for the specific language governing permissions and</span> -00013 <span class="comment"> * limitations under the License.</span> -00014 <span class="comment"> */</span> -00015 -00016 <span class="preprocessor">#ifndef APR_GLOBAL_MUTEX_H</span> -00017 <span class="preprocessor"></span><span class="preprocessor">#define APR_GLOBAL_MUTEX_H</span> -00018 <span class="preprocessor"></span><span class="comment"></span> -00019 <span class="comment">/**</span> -00020 <span class="comment"> * @file apr_global_mutex.h</span> -00021 <span class="comment"> * @brief APR Global Locking Routines</span> -00022 <span class="comment"> */</span> -00023 -00024 <span class="preprocessor">#include "apr.h"</span> -00025 <span class="preprocessor">#include "<a class="code" href="apr__proc__mutex_8h.html">apr_proc_mutex.h</a>"</span> <span class="comment">/* only for apr_lockmech_e */</span> -00026 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span> -00027 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span> -00028 <span class="preprocessor">#if APR_PROC_MUTEX_IS_GLOBAL</span> -00029 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="apr__proc__mutex_8h.html">apr_proc_mutex.h</a>"</span> -00030 <span class="preprocessor">#endif</span> -00031 <span class="preprocessor"></span> -00032 <span class="preprocessor">#ifdef __cplusplus</span> -00033 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { -00034 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> -00035 <span class="comment"></span> -00036 <span class="comment">/**</span> -00037 <span class="comment"> * @defgroup APR_GlobalMutex Global Locking Routines</span> -00038 <span class="comment"> * @ingroup APR </span> -00039 <span class="comment"> * @{</span> -00040 <span class="comment"> */</span> -00041 -00042 <span class="preprocessor">#if !APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)</span> -00043 <span class="preprocessor"></span><span class="comment"></span> -00044 <span class="comment">/** Opaque global mutex structure. */</span> -<a name="l00045"></a><a class="code" href="group___a_p_r___global_mutex.html#ga0">00045</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group___a_p_r___global_mutex.html#ga0">apr_global_mutex_t</a> <a class="code" href="group___a_p_r___global_mutex.html#ga0">apr_global_mutex_t</a>; -00046 -00047 <span class="comment">/* Function definitions */</span> -00048 <span class="comment"></span> -00049 <span class="comment">/**</span> -00050 <span class="comment"> * Create and initialize a mutex that can be used to synchronize both</span> -00051 <span class="comment"> * processes and threads. Note: There is considerable overhead in using</span> -00052 <span class="comment"> * this API if only cross-process or cross-thread mutual exclusion is</span> -00053 <span class="comment"> * required. See apr_proc_mutex.h and apr_thread_mutex.h for more</span> -00054 <span class="comment"> * specialized lock routines.</span> -00055 <span class="comment"> * @param mutex the memory address where the newly created mutex will be</span> -00056 <span class="comment"> * stored.</span> -00057 <span class="comment"> * @param fname A file name to use if the lock mechanism requires one. This</span> -00058 <span class="comment"> * argument should always be provided. The lock code itself will</span> -00059 <span class="comment"> * determine if it should be used.</span> -00060 <span class="comment"> * @param mech The mechanism to use for the interprocess lock, if any; one of</span> -00061 <span class="comment"> * <PRE></span> -00062 <span class="comment"> * APR_LOCK_FCNTL</span> -00063 <span class="comment"> * APR_LOCK_FLOCK</span> -00064 <span class="comment"> * APR_LOCK_SYSVSEM</span> -00065 <span class="comment"> * APR_LOCK_POSIXSEM</span> -00066 <span class="comment"> * APR_LOCK_PROC_PTHREAD</span> -00067 <span class="comment"> * APR_LOCK_DEFAULT pick the default mechanism for the platform</span> -00068 <span class="comment"> * </PRE></span> -00069 <span class="comment"> * @param pool the pool from which to allocate the mutex.</span> -00070 <span class="comment"> * @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports</span> -00071 <span class="comment"> * APR_LOCK_foo. Only APR_LOCK_DEFAULT is portable.</span> -00072 <span class="comment"> */</span> -00073 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_global_mutex_create(apr_global_mutex_t **mutex, -00074 const <span class="keywordtype">char</span> *fname, -00075 apr_lockmech_e mech, -00076 <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool); -00077 <span class="comment"></span> -00078 <span class="comment">/**</span> -00079 <span class="comment"> * Re-open a mutex in a child process.</span> -00080 <span class="comment"> * @param mutex The newly re-opened mutex structure.</span> -00081 <span class="comment"> * @param fname A file name to use if the mutex mechanism requires one. This</span> -00082 <span class="comment"> * argument should always be provided. The mutex code itself will</span> -00083 <span class="comment"> * determine if it should be used. This filename should be the </span> -00084 <span class="comment"> * same one that was passed to apr_global_mutex_create().</span> -00085 <span class="comment"> * @param pool The pool to operate on.</span> -00086 <span class="comment"> * @remark This function must be called to maintain portability, even</span> -00087 <span class="comment"> * if the underlying lock mechanism does not require it.</span> -00088 <span class="comment"> */</span> -00089 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_global_mutex_child_init( -00090 apr_global_mutex_t **mutex, -00091 const <span class="keywordtype">char</span> *fname, -00092 <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool); -00093 <span class="comment"></span> -00094 <span class="comment">/**</span> -00095 <span class="comment"> * Acquire the lock for the given mutex. If the mutex is already locked,</span> -00096 <span class="comment"> * the current thread will be put to sleep until the lock becomes available.</span> -00097 <span class="comment"> * @param mutex the mutex on which to acquire the lock.</span> -00098 <span class="comment"> */</span> -00099 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_global_mutex_lock(apr_global_mutex_t *mutex); -00100 <span class="comment"></span> -00101 <span class="comment">/**</span> -00102 <span class="comment"> * Attempt to acquire the lock for the given mutex. If the mutex has already</span> -00103 <span class="comment"> * been acquired, the call returns immediately with APR_EBUSY. Note: it</span> -00104 <span class="comment"> * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine</span> -00105 <span class="comment"> * if the return value was APR_EBUSY, for portability reasons.</span> -00106 <span class="comment"> * @param mutex the mutex on which to attempt the lock acquiring.</span> -00107 <span class="comment"> */</span> -00108 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_global_mutex_trylock(apr_global_mutex_t *mutex); -00109 <span class="comment"></span> -00110 <span class="comment">/**</span> -00111 <span class="comment"> * Release the lock for the given mutex.</span> -00112 <span class="comment"> * @param mutex the mutex from which to release the lock.</span> -00113 <span class="comment"> */</span> -00114 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_global_mutex_unlock(apr_global_mutex_t *mutex); -00115 <span class="comment"></span> -00116 <span class="comment">/**</span> -00117 <span class="comment"> * Destroy the mutex and free the memory associated with the lock.</span> -00118 <span class="comment"> * @param mutex the mutex to destroy.</span> -00119 <span class="comment"> */</span> -00120 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_global_mutex_destroy(apr_global_mutex_t *mutex); -00121 <span class="comment"></span> -00122 <span class="comment">/**</span> -00123 <span class="comment"> * Get the pool used by this global_mutex.</span> -00124 <span class="comment"> * @return apr_pool_t the pool</span> -00125 <span class="comment"> */</span> -00126 APR_POOL_DECLARE_ACCESSOR(global_mutex); -00127 -00128 #else <span class="comment">/* APR_PROC_MUTEX_IS_GLOBAL */</span> -00129 -00130 <span class="comment">/* Some platforms [e.g. Win32] have cross process locks that are truly</span> -00131 <span class="comment"> * global locks, since there isn't the concept of cross-process locks.</span> -00132 <span class="comment"> * Define these platforms in terms of an apr_proc_mutex_t.</span> -00133 <span class="comment"> */</span> -00134 -00135 #define apr_global_mutex_t <a class="code" href="group__apr__proc__mutex.html#ga0">apr_proc_mutex_t</a> -00136 #define apr_global_mutex_create apr_proc_mutex_create -00137 #define apr_global_mutex_child_init apr_proc_mutex_child_init -00138 #define apr_global_mutex_lock apr_proc_mutex_lock -00139 #define apr_global_mutex_trylock apr_proc_mutex_trylock -00140 #define apr_global_mutex_unlock apr_proc_mutex_unlock -00141 #define apr_global_mutex_destroy apr_proc_mutex_destroy -00142 #define apr_global_mutex_pool_get apr_proc_mutex_pool_get -00143 -00144 #endif -00145 <span class="comment"></span> -00146 <span class="comment">/** @} */</span> -00147 -00148 #ifdef __cplusplus -00149 } -00150 #endif -00151 -00152 #endif <span class="comment">/* ndef APR_GLOBAL_MUTEX_H */</span> -</div></pre><hr size="1"><address style="align: right;"><small>Generated on Wed Sep 1 21:36:05 2004 for Apache Portable Runtime by +<h1>apr_global_mutex.h</h1><a href="apr__global__mutex_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span> +00002 <span class="comment"> * applicable.</span> +00003 <span class="comment"> *</span> +00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> +00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> +00006 <span class="comment"> * You may obtain a copy of the License at</span> +00007 <span class="comment"> *</span> +00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> +00009 <span class="comment"> *</span> +00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> +00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> +00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> +00013 <span class="comment"> * See the License for the specific language governing permissions and</span> +00014 <span class="comment"> * limitations under the License.</span> +00015 <span class="comment"> */</span> +00016 +00017 <span class="preprocessor">#ifndef APR_GLOBAL_MUTEX_H</span> +00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_GLOBAL_MUTEX_H</span> +00019 <span class="preprocessor"></span><span class="comment"></span> +00020 <span class="comment">/**</span> +00021 <span class="comment"> * @file apr_global_mutex.h</span> +00022 <span class="comment"> * @brief APR Global Locking Routines</span> +00023 <span class="comment"> */</span> +00024 +00025 <span class="preprocessor">#include "apr.h"</span> +00026 <span class="preprocessor">#include "<a class="code" href="apr__proc__mutex_8h.html">apr_proc_mutex.h</a>"</span> <span class="comment">/* only for apr_lockmech_e */</span> +00027 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span> +00028 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span> +00029 <span class="preprocessor">#if APR_PROC_MUTEX_IS_GLOBAL</span> +00030 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="apr__proc__mutex_8h.html">apr_proc_mutex.h</a>"</span> +00031 <span class="preprocessor">#endif</span> +00032 <span class="preprocessor"></span> +00033 <span class="preprocessor">#ifdef __cplusplus</span> +00034 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { +00035 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> +00036 <span class="comment"></span> +00037 <span class="comment">/**</span> +00038 <span class="comment"> * @defgroup APR_GlobalMutex Global Locking Routines</span> +00039 <span class="comment"> * @ingroup APR </span> +00040 <span class="comment"> * @{</span> +00041 <span class="comment"> */</span> +00042 +00043 <span class="preprocessor">#if !APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)</span> +00044 <span class="preprocessor"></span><span class="comment"></span> +00045 <span class="comment">/** Opaque global mutex structure. */</span> +<a name="l00046"></a><a class="code" href="group___a_p_r___global_mutex.html#ga0">00046</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group___a_p_r___global_mutex.html#ga0">apr_global_mutex_t</a> <a class="code" href="group___a_p_r___global_mutex.html#ga0">apr_global_mutex_t</a>; +00047 +00048 <span class="comment">/* Function definitions */</span> +00049 <span class="comment"></span> +00050 <span class="comment">/**</span> +00051 <span class="comment"> * Create and initialize a mutex that can be used to synchronize both</span> +00052 <span class="comment"> * processes and threads. Note: There is considerable overhead in using</span> +00053 <span class="comment"> * this API if only cross-process or cross-thread mutual exclusion is</span> +00054 <span class="comment"> * required. See apr_proc_mutex.h and apr_thread_mutex.h for more</span> +00055 <span class="comment"> * specialized lock routines.</span> +00056 <span class="comment"> * @param mutex the memory address where the newly created mutex will be</span> +00057 <span class="comment"> * stored.</span> +00058 <span class="comment"> * @param fname A file name to use if the lock mechanism requires one. This</span> +00059 <span class="comment"> * argument should always be provided. The lock code itself will</span> +00060 <span class="comment"> * determine if it should be used.</span> +00061 <span class="comment"> * @param mech The mechanism to use for the interprocess lock, if any; one of</span> +00062 <span class="comment"> * <PRE></span> +00063 <span class="comment"> * APR_LOCK_FCNTL</span> +00064 <span class="comment"> * APR_LOCK_FLOCK</span> +00065 <span class="comment"> * APR_LOCK_SYSVSEM</span> +00066 <span class="comment"> * APR_LOCK_POSIXSEM</span> +00067 <span class="comment"> * APR_LOCK_PROC_PTHREAD</span> +00068 <span class="comment"> * APR_LOCK_DEFAULT pick the default mechanism for the platform</span> +00069 <span class="comment"> * </PRE></span> +00070 <span class="comment"> * @param pool the pool from which to allocate the mutex.</span> +00071 <span class="comment"> * @warning Check APR_HAS_foo_SERIALIZE defines to see if the platform supports</span> +00072 <span class="comment"> * APR_LOCK_foo. Only APR_LOCK_DEFAULT is portable.</span> +00073 <span class="comment"> */</span> +00074 APR_DECLARE(apr_status_t) apr_global_mutex_create(apr_global_mutex_t **mutex, +00075 const <span class="keywordtype">char</span> *fname, +00076 apr_lockmech_e mech, +00077 apr_pool_t *pool); +00078 <span class="comment"></span> +00079 <span class="comment">/**</span> +00080 <span class="comment"> * Re-open a mutex in a child process.</span> +00081 <span class="comment"> * @param mutex The newly re-opened mutex structure.</span> +00082 <span class="comment"> * @param fname A file name to use if the mutex mechanism requires one. This</span> +00083 <span class="comment"> * argument should always be provided. The mutex code itself will</span> +00084 <span class="comment"> * determine if it should be used. This filename should be the </span> +00085 <span class="comment"> * same one that was passed to apr_global_mutex_create().</span> +00086 <span class="comment"> * @param pool The pool to operate on.</span> +00087 <span class="comment"> * @remark This function must be called to maintain portability, even</span> +00088 <span class="comment"> * if the underlying lock mechanism does not require it.</span> +00089 <span class="comment"> */</span> +00090 APR_DECLARE(apr_status_t) apr_global_mutex_child_init( +00091 apr_global_mutex_t **mutex, +00092 const <span class="keywordtype">char</span> *fname, +00093 apr_pool_t *pool); +00094 <span class="comment"></span> +00095 <span class="comment">/**</span> +00096 <span class="comment"> * Acquire the lock for the given mutex. If the mutex is already locked,</span> +00097 <span class="comment"> * the current thread will be put to sleep until the lock becomes available.</span> +00098 <span class="comment"> * @param mutex the mutex on which to acquire the lock.</span> +00099 <span class="comment"> */</span> +00100 APR_DECLARE(apr_status_t) apr_global_mutex_lock(apr_global_mutex_t *mutex); +00101 <span class="comment"></span> +00102 <span class="comment">/**</span> +00103 <span class="comment"> * Attempt to acquire the lock for the given mutex. If the mutex has already</span> +00104 <span class="comment"> * been acquired, the call returns immediately with APR_EBUSY. Note: it</span> +00105 <span class="comment"> * is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine</span> +00106 <span class="comment"> * if the return value was APR_EBUSY, for portability reasons.</span> +00107 <span class="comment"> * @param mutex the mutex on which to attempt the lock acquiring.</span> +00108 <span class="comment"> */</span> +00109 APR_DECLARE(apr_status_t) apr_global_mutex_trylock(apr_global_mutex_t *mutex); +00110 <span class="comment"></span> +00111 <span class="comment">/**</span> +00112 <span class="comment"> * Release the lock for the given mutex.</span> +00113 <span class="comment"> * @param mutex the mutex from which to release the lock.</span> +00114 <span class="comment"> */</span> +00115 APR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex); +00116 <span class="comment"></span> +00117 <span class="comment">/**</span> +00118 <span class="comment"> * Destroy the mutex and free the memory associated with the lock.</span> +00119 <span class="comment"> * @param mutex the mutex to destroy.</span> +00120 <span class="comment"> */</span> +00121 APR_DECLARE(apr_status_t) apr_global_mutex_destroy(apr_global_mutex_t *mutex); +00122 <span class="comment"></span> +00123 <span class="comment">/**</span> +00124 <span class="comment"> * Get the pool used by this global_mutex.</span> +00125 <span class="comment"> * @return apr_pool_t the pool</span> +00126 <span class="comment"> */</span> +00127 APR_POOL_DECLARE_ACCESSOR(global_mutex); +00128 +00129 #else <span class="comment">/* APR_PROC_MUTEX_IS_GLOBAL */</span> +00130 +00131 <span class="comment">/* Some platforms [e.g. Win32] have cross process locks that are truly</span> +00132 <span class="comment"> * global locks, since there isn't the concept of cross-process locks.</span> +00133 <span class="comment"> * Define these platforms in terms of an apr_proc_mutex_t.</span> +00134 <span class="comment"> */</span> +00135 +00136 #define apr_global_mutex_t <a class="code" href="group__apr__proc__mutex.html#ga0">apr_proc_mutex_t</a> +00137 #define apr_global_mutex_create apr_proc_mutex_create +00138 #define apr_global_mutex_child_init apr_proc_mutex_child_init +00139 #define apr_global_mutex_lock apr_proc_mutex_lock +00140 #define apr_global_mutex_trylock apr_proc_mutex_trylock +00141 #define apr_global_mutex_unlock apr_proc_mutex_unlock +00142 #define apr_global_mutex_destroy apr_proc_mutex_destroy +00143 #define apr_global_mutex_pool_get apr_proc_mutex_pool_get +00144 +00145 #endif +00146 <span class="comment"></span> +00147 <span class="comment">/** @} */</span> +00148 +00149 #ifdef __cplusplus +00150 } +00151 #endif +00152 +00153 #endif <span class="comment">/* ndef APR_GLOBAL_MUTEX_H */</span> +</div></pre><hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html>
Modified: apr/site/trunk/docs/docs/apr/apr__global__mutex_8h.html URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__global__mutex_8h.html?view=diff&r1=151767&r2=151768 ============================================================================== --- apr/site/trunk/docs/docs/apr/apr__global__mutex_8h.html (original) +++ apr/site/trunk/docs/docs/apr/apr__global__mutex_8h.html Mon Feb 7 15:10:17 2005 @@ -3,9 +3,10 @@ <title>Apache Portable Runtime: apr_global_mutex.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.3.8 --> +<!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> -<h1>apr_global_mutex.h File Reference</h1>APR Global Locking Routines. <a href="#_details">More...</a> +<h1>apr_global_mutex.h File Reference</h1>APR Global Locking Routines. +<a href="#_details">More...</a> <p> <code>#include "apr.h"</code><br> <code>#include "<a class="el" href="apr__proc__mutex_8h-source.html">apr_proc_mutex.h</a>"</code><br> @@ -37,8 +38,8 @@ <hr><a name="_details"></a><h2>Detailed Description</h2> APR Global Locking Routines. <p> -<hr size="1"><address style="align: right;"><small>Generated on Wed Sep 1 21:36:05 2004 for Apache Portable Runtime by +<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html> Modified: apr/site/trunk/docs/docs/apr/apr__hash_8h-source.html URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__hash_8h-source.html?view=diff&r1=151767&r2=151768 ============================================================================== --- apr/site/trunk/docs/docs/apr/apr__hash_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/apr__hash_8h-source.html Mon Feb 7 15:10:17 2005 @@ -3,234 +3,235 @@ <title>Apache Portable Runtime: apr_hash.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.3.8 --> +<!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> -<h1>apr_hash.h</h1><a href="apr__hash_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span> -00002 <span class="comment"> *</span> -00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> -00004 <span class="comment"> * you may not use this file except in compliance with the License.</span> -00005 <span class="comment"> * You may obtain a copy of the License at</span> -00006 <span class="comment"> *</span> -00007 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> -00008 <span class="comment"> *</span> -00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> -00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> -00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> -00012 <span class="comment"> * See the License for the specific language governing permissions and</span> -00013 <span class="comment"> * limitations under the License.</span> -00014 <span class="comment"> */</span> -00015 -00016 <span class="preprocessor">#ifndef APR_HASH_H</span> -00017 <span class="preprocessor"></span><span class="preprocessor">#define APR_HASH_H</span> -00018 <span class="preprocessor"></span><span class="comment"></span> -00019 <span class="comment">/**</span> -00020 <span class="comment"> * @file apr_hash.h</span> -00021 <span class="comment"> * @brief APR Hash Tables</span> -00022 <span class="comment"> */</span> -00023 -00024 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span> -00025 -00026 <span class="preprocessor">#ifdef __cplusplus</span> -00027 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { -00028 <span class="preprocessor">#endif</span> -00029 <span class="preprocessor"></span><span class="comment"></span> -00030 <span class="comment">/**</span> -00031 <span class="comment"> * @defgroup apr_hash Hash Tables</span> -00032 <span class="comment"> * @ingroup APR </span> -00033 <span class="comment"> * @{</span> -00034 <span class="comment"> */</span> -00035 <span class="comment"></span> -00036 <span class="comment">/**</span> -00037 <span class="comment"> * When passing a key to apr_hash_set or apr_hash_get, this value can be</span> -00038 <span class="comment"> * passed to indicate a string-valued key, and have apr_hash compute the</span> -00039 <span class="comment"> * length automatically.</span> -00040 <span class="comment"> *</span> -00041 <span class="comment"> * @remark apr_hash will use strlen(key) for the length. The NUL terminator</span> -00042 <span class="comment"> * is not included in the hash value (why throw a constant in?).</span> -00043 <span class="comment"> * Since the hash table merely references the provided key (rather</span> -00044 <span class="comment"> * than copying it), apr_hash_this() will return the NUL-term'd key.</span> -00045 <span class="comment"> */</span> -<a name="l00046"></a><a class="code" href="group__apr__hash.html#ga16">00046</a> <span class="preprocessor">#define APR_HASH_KEY_STRING (-1)</span> -00047 <span class="preprocessor"></span><span class="comment"></span> -00048 <span class="comment">/**</span> -00049 <span class="comment"> * Abstract type for hash tables.</span> -00050 <span class="comment"> */</span> -<a name="l00051"></a><a class="code" href="group__apr__hash.html#ga0">00051</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__hash.html#ga0">apr_hash_t</a> <a class="code" href="group__apr__hash.html#ga0">apr_hash_t</a>; -00052 <span class="comment"></span> -00053 <span class="comment">/**</span> -00054 <span class="comment"> * Abstract type for scanning hash tables.</span> -00055 <span class="comment"> */</span> -<a name="l00056"></a><a class="code" href="group__apr__hash.html#ga1">00056</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__hash.html#ga1">apr_hash_index_t</a> <a class="code" href="group__apr__hash.html#ga1">apr_hash_index_t</a>; -00057 <span class="comment"></span> -00058 <span class="comment">/**</span> -00059 <span class="comment"> * Callback functions for calculating hash values.</span> -00060 <span class="comment"> * @param key The key.</span> -00061 <span class="comment"> * @param klen The length of the key, or APR_HASH_KEY_STRING to use the string </span> -00062 <span class="comment"> * length. If APR_HASH_KEY_STRING then returns the actual key length.</span> -00063 <span class="comment"> */</span> -<a name="l00064"></a><a class="code" href="group__apr__hash.html#ga2">00064</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> int (*<a class="code" href="group__apr__hash.html#ga2">apr_hashfunc_t</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span> *key, apr_ssize_t *klen); -00065 <span class="comment"></span> -00066 <span class="comment">/**</span> -00067 <span class="comment"> * The default hash function.</span> -00068 <span class="comment"> */</span> -00069 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__apr__hash.html#ga3">apr_hashfunc_default</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *key, apr_ssize_t *klen); -00070 <span class="comment"></span> -00071 <span class="comment">/**</span> -00072 <span class="comment"> * Create a hash table.</span> -00073 <span class="comment"> * @param pool The pool to allocate the hash table out of</span> -00074 <span class="comment"> * @return The hash table just created</span> -00075 <span class="comment"> */</span> -00076 APR_DECLARE(apr_hash_t *) apr_hash_make(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool); -00077 <span class="comment"></span> -00078 <span class="comment">/**</span> -00079 <span class="comment"> * Create a hash table with a custom hash function</span> -00080 <span class="comment"> * @param pool The pool to allocate the hash table out of</span> -00081 <span class="comment"> * @param hash_func A custom hash function.</span> -00082 <span class="comment"> * @return The hash table just created</span> -00083 <span class="comment"> */</span> -00084 APR_DECLARE(apr_hash_t *) apr_hash_make_custom(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool, -00085 <a class="code" href="group__apr__hash.html#ga2">apr_hashfunc_t</a> hash_func); -00086 <span class="comment"></span> -00087 <span class="comment">/**</span> -00088 <span class="comment"> * Make a copy of a hash table</span> -00089 <span class="comment"> * @param pool The pool from which to allocate the new hash table</span> -00090 <span class="comment"> * @param h The hash table to clone</span> -00091 <span class="comment"> * @return The hash table just created</span> -00092 <span class="comment"> * @remark Makes a shallow copy</span> -00093 <span class="comment"> */</span> -00094 APR_DECLARE(apr_hash_t *) apr_hash_copy(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool, -00095 const apr_hash_t *h); -00096 <span class="comment"></span> -00097 <span class="comment">/**</span> -00098 <span class="comment"> * Associate a value with a key in a hash table.</span> -00099 <span class="comment"> * @param ht The hash table</span> -00100 <span class="comment"> * @param key Pointer to the key</span> -00101 <span class="comment"> * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.</span> -00102 <span class="comment"> * @param val Value to associate with the key</span> -00103 <span class="comment"> * @remark If the value is NULL the hash entry is deleted.</span> -00104 <span class="comment"> */</span> -00105 APR_DECLARE(<span class="keywordtype">void</span>) apr_hash_set(apr_hash_t *ht, const <span class="keywordtype">void</span> *key, -00106 apr_ssize_t klen, const <span class="keywordtype">void</span> *val); -00107 <span class="comment"></span> -00108 <span class="comment">/**</span> -00109 <span class="comment"> * Look up the value associated with a key in a hash table.</span> -00110 <span class="comment"> * @param ht The hash table</span> -00111 <span class="comment"> * @param key Pointer to the key</span> -00112 <span class="comment"> * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.</span> -00113 <span class="comment"> * @return Returns NULL if the key is not present.</span> -00114 <span class="comment"> */</span> -00115 APR_DECLARE(<span class="keywordtype">void</span> *) apr_hash_get(apr_hash_t *ht, const <span class="keywordtype">void</span> *key, -00116 apr_ssize_t klen); -00117 <span class="comment"></span> -00118 <span class="comment">/**</span> -00119 <span class="comment"> * Start iterating over the entries in a hash table.</span> -00120 <span class="comment"> * @param p The pool to allocate the apr_hash_index_t iterator. If this</span> -00121 <span class="comment"> * pool is NULL, then an internal, non-thread-safe iterator is used.</span> -00122 <span class="comment"> * @param ht The hash table</span> -00123 <span class="comment"> * @remark There is no restriction on adding or deleting hash entries during</span> -00124 <span class="comment"> * an iteration (although the results may be unpredictable unless all you do</span> -00125 <span class="comment"> * is delete the current entry) and multiple iterations can be in</span> -00126 <span class="comment"> * progress at the same time.</span> -00127 <span class="comment"></span> -00128 <span class="comment"> * @example</span> -00129 <span class="comment"> */</span><span class="comment"></span> -00130 <span class="comment">/**</span> -00131 <span class="comment"> * <PRE></span> -00132 <span class="comment"> * </span> -00133 <span class="comment"> * int sum_values(apr_pool_t *p, apr_hash_t *ht)</span> -00134 <span class="comment"> * {</span> -00135 <span class="comment"> * apr_hash_index_t *hi;</span> -00136 <span class="comment"> * void *val;</span> -00137 <span class="comment"> * int sum = 0;</span> -00138 <span class="comment"> * for (hi = apr_hash_first(p, ht); hi; hi = apr_hash_next(hi)) {</span> -00139 <span class="comment"> * apr_hash_this(hi, NULL, NULL, &val);</span> -00140 <span class="comment"> * sum += *(int *)val;</span> -00141 <span class="comment"> * }</span> -00142 <span class="comment"> * return sum;</span> -00143 <span class="comment"> * }</span> -00144 <span class="comment"> * </PRE></span> -00145 <span class="comment"> */</span> -00146 APR_DECLARE(apr_hash_index_t *) apr_hash_first(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, apr_hash_t *ht); -00147 <span class="comment"></span> -00148 <span class="comment">/**</span> -00149 <span class="comment"> * Continue iterating over the entries in a hash table.</span> -00150 <span class="comment"> * @param hi The iteration state</span> -00151 <span class="comment"> * @return a pointer to the updated iteration state. NULL if there are no more </span> -00152 <span class="comment"> * entries.</span> -00153 <span class="comment"> */</span> -00154 APR_DECLARE(apr_hash_index_t *) apr_hash_next(apr_hash_index_t *hi); -00155 <span class="comment"></span> -00156 <span class="comment">/**</span> -00157 <span class="comment"> * Get the current entry's details from the iteration state.</span> -00158 <span class="comment"> * @param hi The iteration state</span> -00159 <span class="comment"> * @param key Return pointer for the pointer to the key.</span> -00160 <span class="comment"> * @param klen Return pointer for the key length.</span> -00161 <span class="comment"> * @param val Return pointer for the associated value.</span> -00162 <span class="comment"> * @remark The return pointers should point to a variable that will be set to the</span> -00163 <span class="comment"> * corresponding data, or they may be NULL if the data isn't interesting.</span> -00164 <span class="comment"> */</span> -00165 APR_DECLARE(<span class="keywordtype">void</span>) apr_hash_this(apr_hash_index_t *hi, const <span class="keywordtype">void</span> **key, -00166 apr_ssize_t *klen, <span class="keywordtype">void</span> **val); -00167 <span class="comment"></span> -00168 <span class="comment">/**</span> -00169 <span class="comment"> * Get the number of key/value pairs in the hash table.</span> -00170 <span class="comment"> * @param ht The hash table</span> -00171 <span class="comment"> * @return The number of key/value pairs in the hash table.</span> -00172 <span class="comment"> */</span> -00173 APR_DECLARE(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) apr_hash_count(apr_hash_t *ht); -00174 <span class="comment"></span> -00175 <span class="comment">/**</span> -00176 <span class="comment"> * Merge two hash tables into one new hash table. The values of the overlay</span> -00177 <span class="comment"> * hash override the values of the base if both have the same key. Both</span> -00178 <span class="comment"> * hash tables must use the same hash function.</span> -00179 <span class="comment"> * @param p The pool to use for the new hash table</span> -00180 <span class="comment"> * @param overlay The table to add to the initial table</span> -00181 <span class="comment"> * @param base The table that represents the initial values of the new table</span> -00182 <span class="comment"> * @return A new hash table containing all of the data from the two passed in</span> -00183 <span class="comment"> */</span> -00184 APR_DECLARE(apr_hash_t *) apr_hash_overlay(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, -00185 const apr_hash_t *overlay, -00186 const apr_hash_t *base); -00187 <span class="comment"></span> -00188 <span class="comment">/**</span> -00189 <span class="comment"> * Merge two hash tables into one new hash table. If the same key</span> -00190 <span class="comment"> * is present in both tables, call the supplied merge function to</span> -00191 <span class="comment"> * produce a merged value for the key in the new table. Both</span> -00192 <span class="comment"> * hash tables must use the same hash function.</span> -00193 <span class="comment"> * @param p The pool to use for the new hash table</span> -00194 <span class="comment"> * @param h1 The first of the tables to merge</span> -00195 <span class="comment"> * @param h2 The second of the tables to merge</span> -00196 <span class="comment"> * @param merger A callback function to merge values, or NULL to</span> -00197 <span class="comment"> * make values from h1 override values from h2 (same semantics as</span> -00198 <span class="comment"> * apr_hash_overlay())</span> -00199 <span class="comment"> * @param data Client data to pass to the merger function</span> -00200 <span class="comment"> * @return A new hash table containing all of the data from the two passed in</span> -00201 <span class="comment"> */</span> -00202 APR_DECLARE(apr_hash_t *) apr_hash_merge(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, -00203 const apr_hash_t *h1, -00204 const apr_hash_t *h2, -00205 <span class="keywordtype">void</span> * (*merger)(<a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, -00206 const <span class="keywordtype">void</span> *key, -00207 apr_ssize_t klen, -00208 const <span class="keywordtype">void</span> *h1_val, -00209 const <span class="keywordtype">void</span> *h2_val, -00210 const <span class="keywordtype">void</span> *data), -00211 const <span class="keywordtype">void</span> *data); -00212 <span class="comment"></span> -00213 <span class="comment">/**</span> -00214 <span class="comment"> * Get a pointer to the pool which the hash table was created in</span> -00215 <span class="comment"> */</span> -00216 APR_POOL_DECLARE_ACCESSOR(hash); -00217 <span class="comment"></span> -00218 <span class="comment">/** @} */</span> -00219 -00220 #ifdef __cplusplus -00221 } -00222 #endif -00223 -00224 #endif <span class="comment">/* !APR_HASH_H */</span> -</div></pre><hr size="1"><address style="align: right;"><small>Generated on Wed Sep 1 21:36:05 2004 for Apache Portable Runtime by +<h1>apr_hash.h</h1><a href="apr__hash_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span> +00002 <span class="comment"> * applicable.</span> +00003 <span class="comment"> *</span> +00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> +00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> +00006 <span class="comment"> * You may obtain a copy of the License at</span> +00007 <span class="comment"> *</span> +00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> +00009 <span class="comment"> *</span> +00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> +00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> +00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> +00013 <span class="comment"> * See the License for the specific language governing permissions and</span> +00014 <span class="comment"> * limitations under the License.</span> +00015 <span class="comment"> */</span> +00016 +00017 <span class="preprocessor">#ifndef APR_HASH_H</span> +00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_HASH_H</span> +00019 <span class="preprocessor"></span><span class="comment"></span> +00020 <span class="comment">/**</span> +00021 <span class="comment"> * @file apr_hash.h</span> +00022 <span class="comment"> * @brief APR Hash Tables</span> +00023 <span class="comment"> */</span> +00024 +00025 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span> +00026 +00027 <span class="preprocessor">#ifdef __cplusplus</span> +00028 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { +00029 <span class="preprocessor">#endif</span> +00030 <span class="preprocessor"></span><span class="comment"></span> +00031 <span class="comment">/**</span> +00032 <span class="comment"> * @defgroup apr_hash Hash Tables</span> +00033 <span class="comment"> * @ingroup APR </span> +00034 <span class="comment"> * @{</span> +00035 <span class="comment"> */</span> +00036 <span class="comment"></span> +00037 <span class="comment">/**</span> +00038 <span class="comment"> * When passing a key to apr_hash_set or apr_hash_get, this value can be</span> +00039 <span class="comment"> * passed to indicate a string-valued key, and have apr_hash compute the</span> +00040 <span class="comment"> * length automatically.</span> +00041 <span class="comment"> *</span> +00042 <span class="comment"> * @remark apr_hash will use strlen(key) for the length. The NUL terminator</span> +00043 <span class="comment"> * is not included in the hash value (why throw a constant in?).</span> +00044 <span class="comment"> * Since the hash table merely references the provided key (rather</span> +00045 <span class="comment"> * than copying it), apr_hash_this() will return the NUL-term'd key.</span> +00046 <span class="comment"> */</span> +<a name="l00047"></a><a class="code" href="group__apr__hash.html#ga16">00047</a> <span class="preprocessor">#define APR_HASH_KEY_STRING (-1)</span> +00048 <span class="preprocessor"></span><span class="comment"></span> +00049 <span class="comment">/**</span> +00050 <span class="comment"> * Abstract type for hash tables.</span> +00051 <span class="comment"> */</span> +<a name="l00052"></a><a class="code" href="group__apr__hash.html#ga0">00052</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__hash.html#ga0">apr_hash_t</a> <a class="code" href="group__apr__hash.html#ga0">apr_hash_t</a>; +00053 <span class="comment"></span> +00054 <span class="comment">/**</span> +00055 <span class="comment"> * Abstract type for scanning hash tables.</span> +00056 <span class="comment"> */</span> +<a name="l00057"></a><a class="code" href="group__apr__hash.html#ga1">00057</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__hash.html#ga1">apr_hash_index_t</a> <a class="code" href="group__apr__hash.html#ga1">apr_hash_index_t</a>; +00058 <span class="comment"></span> +00059 <span class="comment">/**</span> +00060 <span class="comment"> * Callback functions for calculating hash values.</span> +00061 <span class="comment"> * @param key The key.</span> +00062 <span class="comment"> * @param klen The length of the key, or APR_HASH_KEY_STRING to use the string </span> +00063 <span class="comment"> * length. If APR_HASH_KEY_STRING then returns the actual key length.</span> +00064 <span class="comment"> */</span> +<a name="l00065"></a><a class="code" href="group__apr__hash.html#ga2">00065</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> int (*<a class="code" href="group__apr__hash.html#ga2">apr_hashfunc_t</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span> *key, apr_ssize_t *klen); +00066 <span class="comment"></span> +00067 <span class="comment">/**</span> +00068 <span class="comment"> * The default hash function.</span> +00069 <span class="comment"> */</span> +00070 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__apr__hash.html#ga3">apr_hashfunc_default</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *key, apr_ssize_t *klen); +00071 <span class="comment"></span> +00072 <span class="comment">/**</span> +00073 <span class="comment"> * Create a hash table.</span> +00074 <span class="comment"> * @param pool The pool to allocate the hash table out of</span> +00075 <span class="comment"> * @return The hash table just created</span> +00076 <span class="comment"> */</span> +00077 APR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool); +00078 <span class="comment"></span> +00079 <span class="comment">/**</span> +00080 <span class="comment"> * Create a hash table with a custom hash function</span> +00081 <span class="comment"> * @param pool The pool to allocate the hash table out of</span> +00082 <span class="comment"> * @param hash_func A custom hash function.</span> +00083 <span class="comment"> * @return The hash table just created</span> +00084 <span class="comment"> */</span> +00085 APR_DECLARE(apr_hash_t *) apr_hash_make_custom(apr_pool_t *pool, +00086 apr_hashfunc_t hash_func); +00087 <span class="comment"></span> +00088 <span class="comment">/**</span> +00089 <span class="comment"> * Make a copy of a hash table</span> +00090 <span class="comment"> * @param pool The pool from which to allocate the new hash table</span> +00091 <span class="comment"> * @param h The hash table to clone</span> +00092 <span class="comment"> * @return The hash table just created</span> +00093 <span class="comment"> * @remark Makes a shallow copy</span> +00094 <span class="comment"> */</span> +00095 APR_DECLARE(apr_hash_t *) apr_hash_copy(apr_pool_t *pool, +00096 const apr_hash_t *h); +00097 <span class="comment"></span> +00098 <span class="comment">/**</span> +00099 <span class="comment"> * Associate a value with a key in a hash table.</span> +00100 <span class="comment"> * @param ht The hash table</span> +00101 <span class="comment"> * @param key Pointer to the key</span> +00102 <span class="comment"> * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.</span> +00103 <span class="comment"> * @param val Value to associate with the key</span> +00104 <span class="comment"> * @remark If the value is NULL the hash entry is deleted.</span> +00105 <span class="comment"> */</span> +00106 APR_DECLARE(<span class="keywordtype">void</span>) apr_hash_set(apr_hash_t *ht, const <span class="keywordtype">void</span> *key, +00107 apr_ssize_t klen, const <span class="keywordtype">void</span> *val); +00108 <span class="comment"></span> +00109 <span class="comment">/**</span> +00110 <span class="comment"> * Look up the value associated with a key in a hash table.</span> +00111 <span class="comment"> * @param ht The hash table</span> +00112 <span class="comment"> * @param key Pointer to the key</span> +00113 <span class="comment"> * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length.</span> +00114 <span class="comment"> * @return Returns NULL if the key is not present.</span> +00115 <span class="comment"> */</span> +00116 APR_DECLARE(<span class="keywordtype">void</span> *) apr_hash_get(apr_hash_t *ht, const <span class="keywordtype">void</span> *key, +00117 apr_ssize_t klen); +00118 <span class="comment"></span> +00119 <span class="comment">/**</span> +00120 <span class="comment"> * Start iterating over the entries in a hash table.</span> +00121 <span class="comment"> * @param p The pool to allocate the apr_hash_index_t iterator. If this</span> +00122 <span class="comment"> * pool is NULL, then an internal, non-thread-safe iterator is used.</span> +00123 <span class="comment"> * @param ht The hash table</span> +00124 <span class="comment"> * @remark There is no restriction on adding or deleting hash entries during</span> +00125 <span class="comment"> * an iteration (although the results may be unpredictable unless all you do</span> +00126 <span class="comment"> * is delete the current entry) and multiple iterations can be in</span> +00127 <span class="comment"> * progress at the same time.</span> +00128 <span class="comment"></span> +00129 <span class="comment"> * @example</span> +00130 <span class="comment"> */</span><span class="comment"></span> +00131 <span class="comment">/**</span> +00132 <span class="comment"> * <PRE></span> +00133 <span class="comment"> * </span> +00134 <span class="comment"> * int sum_values(apr_pool_t *p, apr_hash_t *ht)</span> +00135 <span class="comment"> * {</span> +00136 <span class="comment"> * apr_hash_index_t *hi;</span> +00137 <span class="comment"> * void *val;</span> +00138 <span class="comment"> * int sum = 0;</span> +00139 <span class="comment"> * for (hi = apr_hash_first(p, ht); hi; hi = apr_hash_next(hi)) {</span> +00140 <span class="comment"> * apr_hash_this(hi, NULL, NULL, &val);</span> +00141 <span class="comment"> * sum += *(int *)val;</span> +00142 <span class="comment"> * }</span> +00143 <span class="comment"> * return sum;</span> +00144 <span class="comment"> * }</span> +00145 <span class="comment"> * </PRE></span> +00146 <span class="comment"> */</span> +00147 APR_DECLARE(apr_hash_index_t *) apr_hash_first(apr_pool_t *p, apr_hash_t *ht); +00148 <span class="comment"></span> +00149 <span class="comment">/**</span> +00150 <span class="comment"> * Continue iterating over the entries in a hash table.</span> +00151 <span class="comment"> * @param hi The iteration state</span> +00152 <span class="comment"> * @return a pointer to the updated iteration state. NULL if there are no more </span> +00153 <span class="comment"> * entries.</span> +00154 <span class="comment"> */</span> +00155 APR_DECLARE(apr_hash_index_t *) apr_hash_next(apr_hash_index_t *hi); +00156 <span class="comment"></span> +00157 <span class="comment">/**</span> +00158 <span class="comment"> * Get the current entry's details from the iteration state.</span> +00159 <span class="comment"> * @param hi The iteration state</span> +00160 <span class="comment"> * @param key Return pointer for the pointer to the key.</span> +00161 <span class="comment"> * @param klen Return pointer for the key length.</span> +00162 <span class="comment"> * @param val Return pointer for the associated value.</span> +00163 <span class="comment"> * @remark The return pointers should point to a variable that will be set to the</span> +00164 <span class="comment"> * corresponding data, or they may be NULL if the data isn't interesting.</span> +00165 <span class="comment"> */</span> +00166 APR_DECLARE(<span class="keywordtype">void</span>) apr_hash_this(apr_hash_index_t *hi, const <span class="keywordtype">void</span> **key, +00167 apr_ssize_t *klen, <span class="keywordtype">void</span> **val); +00168 <span class="comment"></span> +00169 <span class="comment">/**</span> +00170 <span class="comment"> * Get the number of key/value pairs in the hash table.</span> +00171 <span class="comment"> * @param ht The hash table</span> +00172 <span class="comment"> * @return The number of key/value pairs in the hash table.</span> +00173 <span class="comment"> */</span> +00174 APR_DECLARE(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) apr_hash_count(apr_hash_t *ht); +00175 <span class="comment"></span> +00176 <span class="comment">/**</span> +00177 <span class="comment"> * Merge two hash tables into one new hash table. The values of the overlay</span> +00178 <span class="comment"> * hash override the values of the base if both have the same key. Both</span> +00179 <span class="comment"> * hash tables must use the same hash function.</span> +00180 <span class="comment"> * @param p The pool to use for the new hash table</span> +00181 <span class="comment"> * @param overlay The table to add to the initial table</span> +00182 <span class="comment"> * @param base The table that represents the initial values of the new table</span> +00183 <span class="comment"> * @return A new hash table containing all of the data from the two passed in</span> +00184 <span class="comment"> */</span> +00185 APR_DECLARE(apr_hash_t *) apr_hash_overlay(apr_pool_t *p, +00186 const apr_hash_t *overlay, +00187 const apr_hash_t *base); +00188 <span class="comment"></span> +00189 <span class="comment">/**</span> +00190 <span class="comment"> * Merge two hash tables into one new hash table. If the same key</span> +00191 <span class="comment"> * is present in both tables, call the supplied merge function to</span> +00192 <span class="comment"> * produce a merged value for the key in the new table. Both</span> +00193 <span class="comment"> * hash tables must use the same hash function.</span> +00194 <span class="comment"> * @param p The pool to use for the new hash table</span> +00195 <span class="comment"> * @param h1 The first of the tables to merge</span> +00196 <span class="comment"> * @param h2 The second of the tables to merge</span> +00197 <span class="comment"> * @param merger A callback function to merge values, or NULL to</span> +00198 <span class="comment"> * make values from h1 override values from h2 (same semantics as</span> +00199 <span class="comment"> * apr_hash_overlay())</span> +00200 <span class="comment"> * @param data Client data to pass to the merger function</span> +00201 <span class="comment"> * @return A new hash table containing all of the data from the two passed in</span> +00202 <span class="comment"> */</span> +00203 APR_DECLARE(apr_hash_t *) apr_hash_merge(apr_pool_t *p, +00204 const apr_hash_t *h1, +00205 const apr_hash_t *h2, +00206 <span class="keywordtype">void</span> * (*merger)(apr_pool_t *p, +00207 const <span class="keywordtype">void</span> *key, +00208 apr_ssize_t klen, +00209 const <span class="keywordtype">void</span> *h1_val, +00210 const <span class="keywordtype">void</span> *h2_val, +00211 const <span class="keywordtype">void</span> *data), +00212 const <span class="keywordtype">void</span> *data); +00213 <span class="comment"></span> +00214 <span class="comment">/**</span> +00215 <span class="comment"> * Get a pointer to the pool which the hash table was created in</span> +00216 <span class="comment"> */</span> +00217 APR_POOL_DECLARE_ACCESSOR(hash); +00218 <span class="comment"></span> +00219 <span class="comment">/** @} */</span> +00220 +00221 #ifdef __cplusplus +00222 } +00223 #endif +00224 +00225 #endif <span class="comment">/* !APR_HASH_H */</span> +</div></pre><hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html> Modified: apr/site/trunk/docs/docs/apr/apr__hash_8h.html URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__hash_8h.html?view=diff&r1=151767&r2=151768 ============================================================================== --- apr/site/trunk/docs/docs/apr/apr__hash_8h.html (original) +++ apr/site/trunk/docs/docs/apr/apr__hash_8h.html Mon Feb 7 15:10:17 2005 @@ -3,9 +3,10 @@ <title>Apache Portable Runtime: apr_hash.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.3.8 --> +<!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> -<h1>apr_hash.h File Reference</h1>APR Hash Tables. <a href="#_details">More...</a> +<h1>apr_hash.h File Reference</h1>APR Hash Tables. +<a href="#_details">More...</a> <p> <code>#include "<a class="el" href="apr__pools_8h-source.html">apr_pools.h</a>"</code><br> @@ -53,8 +54,8 @@ <hr><a name="_details"></a><h2>Detailed Description</h2> APR Hash Tables. <p> -<hr size="1"><address style="align: right;"><small>Generated on Wed Sep 1 21:36:05 2004 for Apache Portable Runtime by +<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html> Modified: apr/site/trunk/docs/docs/apr/apr__inherit_8h-source.html URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__inherit_8h-source.html?view=diff&r1=151767&r2=151768 ============================================================================== --- apr/site/trunk/docs/docs/apr/apr__inherit_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/apr__inherit_8h-source.html Mon Feb 7 15:10:17 2005 @@ -3,60 +3,61 @@ <title>Apache Portable Runtime: apr_inherit.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.3.8 --> +<!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> -<h1>apr_inherit.h</h1><a href="apr__inherit_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span> -00002 <span class="comment"> *</span> -00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> -00004 <span class="comment"> * you may not use this file except in compliance with the License.</span> -00005 <span class="comment"> * You may obtain a copy of the License at</span> -00006 <span class="comment"> *</span> -00007 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> -00008 <span class="comment"> *</span> -00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> -00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> -00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> -00012 <span class="comment"> * See the License for the specific language governing permissions and</span> -00013 <span class="comment"> * limitations under the License.</span> -00014 <span class="comment"> */</span> -00015 -00016 <span class="preprocessor">#ifndef APR_INHERIT_H</span> -00017 <span class="preprocessor"></span><span class="preprocessor">#define APR_INHERIT_H</span> -00018 <span class="preprocessor"></span><span class="comment"></span> -00019 <span class="comment">/**</span> -00020 <span class="comment"> * @file apr_inherit.h </span> -00021 <span class="comment"> * @brief APR File Handle Inheritance Helpers</span> -00022 <span class="comment"> * @remark This internal header includes internal declaration helpers </span> -00023 <span class="comment"> * for other headers to declare apr_foo_inherit_[un]set functions.</span> -00024 <span class="comment"> */</span> -00025 <span class="comment"></span> -00026 <span class="comment">/**</span> -00027 <span class="comment"> * Prototype for type-specific declarations of apr_foo_inherit_set </span> -00028 <span class="comment"> * functions. </span> -00029 <span class="comment"> * @remark Doxygen unwraps this macro (via doxygen.conf) to provide </span> -00030 <span class="comment"> * actual help for each specific occurance of apr_foo_inherit_set.</span> -00031 <span class="comment"> * @remark the linkage is specified for APR. It would be possible to expand</span> -00032 <span class="comment"> * the macros to support other linkages.</span> -00033 <span class="comment"> */</span> -<a name="l00034"></a><a class="code" href="apr__inherit_8h.html#a0">00034</a> <span class="preprocessor">#define APR_DECLARE_INHERIT_SET(type) \</span> -00035 <span class="preprocessor"> APR_DECLARE(apr_status_t) apr_##type##_inherit_set( \</span> -00036 <span class="preprocessor"> apr_##type##_t *the##type)</span> -00037 <span class="preprocessor"></span><span class="comment"></span> -00038 <span class="comment">/**</span> -00039 <span class="comment"> * Prototype for type-specific declarations of apr_foo_inherit_unset </span> -00040 <span class="comment"> * functions. </span> -00041 <span class="comment"> * @remark Doxygen unwraps this macro (via doxygen.conf) to provide </span> -00042 <span class="comment"> * actual help for each specific occurance of apr_foo_inherit_unset.</span> -00043 <span class="comment"> * @remark the linkage is specified for APR. It would be possible to expand</span> -00044 <span class="comment"> * the macros to support other linkages.</span> -00045 <span class="comment"> */</span> -<a name="l00046"></a><a class="code" href="apr__inherit_8h.html#a1">00046</a> <span class="preprocessor">#define APR_DECLARE_INHERIT_UNSET(type) \</span> -00047 <span class="preprocessor"> APR_DECLARE(apr_status_t) apr_##type##_inherit_unset( \</span> -00048 <span class="preprocessor"> apr_##type##_t *the##type)</span> -00049 <span class="preprocessor"></span> -00050 <span class="preprocessor">#endif </span><span class="comment">/* ! APR_INHERIT_H */</span> -</div></pre><hr size="1"><address style="align: right;"><small>Generated on Wed Sep 1 21:36:05 2004 for Apache Portable Runtime by +<h1>apr_inherit.h</h1><a href="apr__inherit_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span> +00002 <span class="comment"> * applicable.</span> +00003 <span class="comment"> *</span> +00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> +00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> +00006 <span class="comment"> * You may obtain a copy of the License at</span> +00007 <span class="comment"> *</span> +00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> +00009 <span class="comment"> *</span> +00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> +00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> +00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> +00013 <span class="comment"> * See the License for the specific language governing permissions and</span> +00014 <span class="comment"> * limitations under the License.</span> +00015 <span class="comment"> */</span> +00016 +00017 <span class="preprocessor">#ifndef APR_INHERIT_H</span> +00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_INHERIT_H</span> +00019 <span class="preprocessor"></span><span class="comment"></span> +00020 <span class="comment">/**</span> +00021 <span class="comment"> * @file apr_inherit.h </span> +00022 <span class="comment"> * @brief APR File Handle Inheritance Helpers</span> +00023 <span class="comment"> * @remark This internal header includes internal declaration helpers </span> +00024 <span class="comment"> * for other headers to declare apr_foo_inherit_[un]set functions.</span> +00025 <span class="comment"> */</span> +00026 <span class="comment"></span> +00027 <span class="comment">/**</span> +00028 <span class="comment"> * Prototype for type-specific declarations of apr_foo_inherit_set </span> +00029 <span class="comment"> * functions. </span> +00030 <span class="comment"> * @remark Doxygen unwraps this macro (via doxygen.conf) to provide </span> +00031 <span class="comment"> * actual help for each specific occurance of apr_foo_inherit_set.</span> +00032 <span class="comment"> * @remark the linkage is specified for APR. It would be possible to expand</span> +00033 <span class="comment"> * the macros to support other linkages.</span> +00034 <span class="comment"> */</span> +<a name="l00035"></a><a class="code" href="apr__inherit_8h.html#a0">00035</a> <span class="preprocessor">#define APR_DECLARE_INHERIT_SET(type) \</span> +00036 <span class="preprocessor"> APR_DECLARE(apr_status_t) apr_##type##_inherit_set( \</span> +00037 <span class="preprocessor"> apr_##type##_t *the##type)</span> +00038 <span class="preprocessor"></span><span class="comment"></span> +00039 <span class="comment">/**</span> +00040 <span class="comment"> * Prototype for type-specific declarations of apr_foo_inherit_unset </span> +00041 <span class="comment"> * functions. </span> +00042 <span class="comment"> * @remark Doxygen unwraps this macro (via doxygen.conf) to provide </span> +00043 <span class="comment"> * actual help for each specific occurance of apr_foo_inherit_unset.</span> +00044 <span class="comment"> * @remark the linkage is specified for APR. It would be possible to expand</span> +00045 <span class="comment"> * the macros to support other linkages.</span> +00046 <span class="comment"> */</span> +<a name="l00047"></a><a class="code" href="apr__inherit_8h.html#a1">00047</a> <span class="preprocessor">#define APR_DECLARE_INHERIT_UNSET(type) \</span> +00048 <span class="preprocessor"> APR_DECLARE(apr_status_t) apr_##type##_inherit_unset( \</span> +00049 <span class="preprocessor"> apr_##type##_t *the##type)</span> +00050 <span class="preprocessor"></span> +00051 <span class="preprocessor">#endif </span><span class="comment">/* ! APR_INHERIT_H */</span> +</div></pre><hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html> Modified: apr/site/trunk/docs/docs/apr/apr__inherit_8h.html URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__inherit_8h.html?view=diff&r1=151767&r2=151768 ============================================================================== --- apr/site/trunk/docs/docs/apr/apr__inherit_8h.html (original) +++ apr/site/trunk/docs/docs/apr/apr__inherit_8h.html Mon Feb 7 15:10:17 2005 @@ -3,9 +3,10 @@ <title>Apache Portable Runtime: apr_inherit.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.3.8 --> +<!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> -<h1>apr_inherit.h File Reference</h1>APR File Handle Inheritance Helpers. <a href="#_details">More...</a> +<h1>apr_inherit.h File Reference</h1>APR File Handle Inheritance Helpers. +<a href="#_details">More...</a> <p> <p> @@ -47,7 +48,7 @@ <td> <p> -<b>Value:</b><pre class="fragment"><div>APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_##type##_inherit_set( \ +<b>Value:</b><pre class="fragment"><div>APR_DECLARE(apr_status_t) apr_##type##_inherit_set( \ apr_##type##_t *the##type) </div></pre>Prototype for type-specific declarations of apr_foo_inherit_set functions. <dl compact><dt><b>Remarks:</b></dt><dd>Doxygen unwraps this macro (via doxygen.conf) to provide actual help for each specific occurance of apr_foo_inherit_set. <p> the linkage is specified for APR. It would be possible to expand the macros to support other linkages. </dd></dl> @@ -79,15 +80,15 @@ <td> <p> -<b>Value:</b><pre class="fragment"><div>APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_##type##_inherit_unset( \ +<b>Value:</b><pre class="fragment"><div>APR_DECLARE(apr_status_t) apr_##type##_inherit_unset( \ apr_##type##_t *the##type) </div></pre>Prototype for type-specific declarations of apr_foo_inherit_unset functions. <dl compact><dt><b>Remarks:</b></dt><dd>Doxygen unwraps this macro (via doxygen.conf) to provide actual help for each specific occurance of apr_foo_inherit_unset. <p> the linkage is specified for APR. It would be possible to expand the macros to support other linkages. </dd></dl> </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Wed Sep 1 21:36:05 2004 for Apache Portable Runtime by +<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html>