Modified: apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h-source.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h-source.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h-source.html Mon Sep 10 16:37:52 2007 @@ -1,24 +1,26 @@ - + Apache Portable Runtime: apr_proc_mutex.h Source File - +
+ +
+ +

apr_proc_mutex.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
 00002  * contributor license agreements.  See the NOTICE file distributed with
 00003  * this work for additional information regarding copyright ownership.
@@ -43,9 +45,9 @@
 00022  * @brief APR Process Locking Routines
 00023  */
 00024 
-00025 #include "apr.h"
-00026 #include "apr_pools.h"
-00027 #include "apr_errno.h"
+00025 #include "apr.h"
+00026 #include "apr_pools.h"
+00027 #include "apr_errno.h"
 00028 
 00029 #ifdef __cplusplus
 00030 extern "C" {
@@ -63,11 +65,11 @@
 00042  *          APR_LOCK_foo.  Only APR_LOCK_DEFAULT is portable.
 00043  */
 00044 typedef enum {
-00045     APR_LOCK_FCNTL,         /**< fcntl() */
-00046     APR_LOCK_FLOCK,         /**< flock() */
-00047     APR_LOCK_SYSVSEM,       /**< System V Semaphores */
-00048     APR_LOCK_PROC_PTHREAD,  /**< POSIX pthread process-based locking */
-00049     APR_LOCK_POSIXSEM,      /**< POSIX semaphore process-based locking */
+00045     APR_LOCK_FCNTL,         /**< fcntl() */
+00046     APR_LOCK_FLOCK,         /**< flock() */
+00047     APR_LOCK_SYSVSEM,       /**< System V Semaphores */
+00048     APR_LOCK_PROC_PTHREAD,  /**< POSIX pthread process-based locking */
+00049     APR_LOCK_POSIXSEM,      /**< POSIX semaphore process-based locking */
 00050     APR_LOCK_DEFAULT        /**< Use the default process lock */
 00051 } apr_lockmech_e;
 00052 
@@ -185,8 +187,8 @@
 00164 #endif
 00165 
 00166 #endif  /* ! APR_PROC_MUTEX_H */
-

Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2
Modified: apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__proc__mutex_8h.html Mon Sep 10 16:37:52 2007 @@ -1,24 +1,26 @@ - + Apache Portable Runtime: apr_proc_mutex.h File Reference - +
+ +
+ +

apr_proc_mutex.h File Reference

APR Process Locking Routines. More...

#include "apr.h"
@@ -70,8 +72,8 @@


Detailed Description

APR Process Locking Routines.

-


Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2
Modified: apr/site/trunk/docs/docs/apr/trunk/apr__random_8h-source.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__random_8h-source.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__random_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__random_8h-source.html Mon Sep 10 16:37:52 2007 @@ -1,25 +1,27 @@ - + Apache Portable Runtime: apr_random.h Source File - +
+ +
-

apr_random.h

00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
+  
+
+

apr_random.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
 00002  * contributor license agreements.  See the NOTICE file distributed with
 00003  * this work for additional information regarding copyright ownership.
 00004  * The ASF licenses this file to You under the Apache License, Version 2.0
@@ -37,64 +39,143 @@
 00016 
 00017 #ifndef APR_RANDOM_H
 00018 #define APR_RANDOM_H
-00019 
-00020 #include <apr_pools.h>
-00021 
-00022 typedef struct apr_crypto_hash_t apr_crypto_hash_t;
-00023 
-00024 typedef void apr_crypto_hash_init_t(apr_crypto_hash_t *hash);
-00025 typedef void apr_crypto_hash_add_t(apr_crypto_hash_t *hash,const void *data,
-00026                                    apr_size_t bytes);
-00027 typedef void apr_crypto_hash_finish_t(apr_crypto_hash_t *hash,
-00028                                       unsigned char *result);
-00029 
-00030 /* FIXME: make this opaque */
-00031 struct apr_crypto_hash_t {
-00032     apr_crypto_hash_init_t *init;
-00033     apr_crypto_hash_add_t *add;
-00034     apr_crypto_hash_finish_t *finish;
-00035     apr_size_t size;
-00036     void *data;
-00037 };
-00038 
-00039 APR_DECLARE(apr_crypto_hash_t *) apr_crypto_sha256_new(apr_pool_t *p);
-00040 
-00041 typedef struct apr_random_t apr_random_t;
-00042 
-00043 APR_DECLARE(void) apr_random_init(apr_random_t *g,apr_pool_t *p,
-00044                                   apr_crypto_hash_t *pool_hash,
-00045                                   apr_crypto_hash_t *key_hash,
-00046                                   apr_crypto_hash_t *prng_hash);
-00047 APR_DECLARE(apr_random_t *) apr_random_standard_new(apr_pool_t *p);
-00048 APR_DECLARE(void) apr_random_add_entropy(apr_random_t *g,
-00049                                          const void *entropy_,
-00050                                          apr_size_t bytes);
-00051 APR_DECLARE(apr_status_t) apr_random_insecure_bytes(apr_random_t *g,
-00052                                                     void *random,
-00053                                                     apr_size_t bytes);
-00054 APR_DECLARE(apr_status_t) apr_random_secure_bytes(apr_random_t *g,
-00055                                                   void *random,
-00056                                                   apr_size_t bytes);
-00057 APR_DECLARE(void) apr_random_barrier(apr_random_t *g);
-00058 APR_DECLARE(apr_status_t) apr_random_secure_ready(apr_random_t *r);
-00059 APR_DECLARE(apr_status_t) apr_random_insecure_ready(apr_random_t *r);
-00060 
-00061 /* Call this in the child after forking to mix the randomness
-00062    pools. Note that its generally a bad idea to fork a process with a
-00063    real PRNG in it - better to have the PRNG externally and get the
-00064    randomness from there. However, if you really must do it, then you
-00065    should supply all your entropy to all the PRNGs - don't worry, they
-00066    won't produce the same output.
-00067 
-00068    Note that apr_proc_fork() calls this for you, so only weird
-00069    applications need ever call it themselves.
-00070 */
-00071 struct apr_proc_t;
-00072 APR_DECLARE(void) apr_random_after_fork(struct apr_proc_t *proc);
-00073 
-00074 #endif /* ndef APR_RANDOM_H */
-

Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +00019 +00020 /** +00021 * @file apr_random.h +00022 * @brief APR PRNG routines +00023 */ +00024 +00025 #include "apr_pools.h" +00026 #include "apr_thread_proc.h" +00027 +00028 #ifdef __cplusplus +00029 extern "C" { +00030 #endif /* __cplusplus */ +00031 +00032 /** +00033 * @defgroup apr_random PRNG Routines +00034 * @ingroup APR +00035 * @{ +00036 */ +00037 +00038 typedef struct apr_crypto_hash_t apr_crypto_hash_t; +00039 +00040 typedef void apr_crypto_hash_init_t(apr_crypto_hash_t *hash); +00041 typedef void apr_crypto_hash_add_t(apr_crypto_hash_t *hash, const void *data, +00042 apr_size_t bytes); +00043 typedef void apr_crypto_hash_finish_t(apr_crypto_hash_t *hash, +00044 unsigned char *result); +00045 +00046 +00047 /* FIXME: make this opaque */ +00048 struct apr_crypto_hash_t { +00049 apr_crypto_hash_init_t *init; +00050 apr_crypto_hash_add_t *add; +00051 apr_crypto_hash_finish_t *finish; +00052 apr_size_t size; +00053 void *data; +00054 }; +00055 +00056 /** +00057 * Allocate and initialize the SHA-256 context +00058 * @param p The pool to allocate from +00059 */ +00060 APR_DECLARE(apr_crypto_hash_t *) apr_crypto_sha256_new(apr_pool_t *p); +00061 +00062 /** Opaque PRNG structure. */ +00063 typedef struct apr_random_t apr_random_t; +00064 +00065 /** +00066 * Initialize a PRNG state +00067 * @param g The PRNG state +00068 * @param p The pool to allocate from +00069 * @param pool_hash Pool hash functions +00070 * @param key_hash Key hash functions +00071 * @param prng_hash PRNG hash functions +00072 */ +00073 APR_DECLARE(void) apr_random_init(apr_random_t *g, apr_pool_t *p, +00074 apr_crypto_hash_t *pool_hash, +00075 apr_crypto_hash_t *key_hash, +00076 apr_crypto_hash_t *prng_hash); +00077 /** +00078 * Allocate and initialize (apr_crypto_sha256_new) a new PRNG state. +00079 * @param p The pool to allocate from +00080 */ +00081 APR_DECLARE(apr_random_t *) apr_random_standard_new(apr_pool_t *p); +00082 +00083 /** +00084 * Mix the randomness pools. +00085 * @param g The PRNG state +00086 * @param entropy_ Entropy buffer +00087 * @param bytes Length of entropy_ in bytes +00088 */ +00089 APR_DECLARE(void) apr_random_add_entropy(apr_random_t *g, +00090 const void *entropy_, +00091 apr_size_t bytes); +00092 /** +00093 * Generate cryptographically insecure random bytes. +00094 * @param g The RNG state +00095 * @param random Buffer to fill with random bytes +00096 * @param bytes Length of buffer in bytes +00097 */ +00098 APR_DECLARE(apr_status_t) apr_random_insecure_bytes(apr_random_t *g, +00099 void *random, +00100 apr_size_t bytes); +00101 +00102 /** +00103 * Generate cryptographically secure random bytes. +00104 * @param g The RNG state +00105 * @param random Buffer to fill with random bytes +00106 * @param bytes Length of buffer in bytes +00107 */ +00108 APR_DECLARE(apr_status_t) apr_random_secure_bytes(apr_random_t *g, +00109 void *random, +00110 apr_size_t bytes); +00111 /** +00112 * Ensures that E bits of conditional entropy are mixed into the PRNG +00113 * before any further randomness is extracted. +00114 * @param g The RNG state +00115 */ +00116 APR_DECLARE(void) apr_random_barrier(apr_random_t *g); +00117 +00118 /** +00119 * Return APR_SUCCESS if the cryptographic PRNG has been seeded with +00120 * enough data, APR_ENOTENOUGHENTROPY otherwise. +00121 * @param r The RNG state +00122 */ +00123 APR_DECLARE(apr_status_t) apr_random_secure_ready(apr_random_t *r); +00124 +00125 /** +00126 * Return APR_SUCCESS if the PRNG has been seeded with enough data, +00127 * APR_ENOTENOUGHENTROPY otherwise. +00128 * @param r The PRNG state +00129 */ +00130 APR_DECLARE(apr_status_t) apr_random_insecure_ready(apr_random_t *r); +00131 +00132 /** +00133 * Mix the randomness pools after forking. +00134 * @param proc The resulting process handle from apr_proc_fork() +00135 * @remark Call this in the child after forking to mix the randomness +00136 * pools. Note that its generally a bad idea to fork a process with a +00137 * real PRNG in it - better to have the PRNG externally and get the +00138 * randomness from there. However, if you really must do it, then you +00139 * should supply all your entropy to all the PRNGs - don't worry, they +00140 * won't produce the same output. +00141 * @remark Note that apr_proc_fork() calls this for you, so only weird +00142 * applications need ever call it themselves. +00143 * @internal +00144 */ +00145 APR_DECLARE(void) apr_random_after_fork(apr_proc_t *proc); +00146 +00147 /** @} */ +00148 +00149 #ifdef __cplusplus +00150 } +00151 #endif +00152 +00153 #endif /* !APR_RANDOM_H */ +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2
Added: apr/site/trunk/docs/docs/apr/trunk/apr__random_8h.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__random_8h.html?rev=574406&view=auto ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__random_8h.html (added) +++ apr/site/trunk/docs/docs/apr/trunk/apr__random_8h.html Mon Sep 10 16:37:52 2007 @@ -0,0 +1,79 @@ + + +Apache Portable Runtime: apr_random.h File Reference + + + + +
+ +
+
+ +
+

apr_random.h File Reference

APR PRNG routines. More... +

+#include "apr_pools.h"
+#include "apr_thread_proc.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  apr_crypto_hash_t

Typedefs

+typedef apr_crypto_hash_t apr_crypto_hash_t
+typedef void apr_crypto_hash_init_t (apr_crypto_hash_t *hash)
+typedef void apr_crypto_hash_add_t (apr_crypto_hash_t *hash, const void *data, apr_size_t bytes)
+typedef void apr_crypto_hash_finish_t (apr_crypto_hash_t *hash, unsigned char *result)
typedef apr_random_t apr_random_t

Functions

apr_crypto_hash_t * apr_crypto_sha256_new (apr_pool_t *p)
void apr_random_init (apr_random_t *g, apr_pool_t *p, apr_crypto_hash_t *pool_hash, apr_crypto_hash_t *key_hash, apr_crypto_hash_t *prng_hash)
apr_random_tapr_random_standard_new (apr_pool_t *p)
void apr_random_add_entropy (apr_random_t *g, const void *entropy_, apr_size_t bytes)
apr_status_t apr_random_insecure_bytes (apr_random_t *g, void *random, apr_size_t bytes)
apr_status_t apr_random_secure_bytes (apr_random_t *g, void *random, apr_size_t bytes)
void apr_random_barrier (apr_random_t *g)
apr_status_t apr_random_secure_ready (apr_random_t *r)
apr_status_t apr_random_insecure_ready (apr_random_t *r)
void apr_random_after_fork (apr_proc_t *proc)
+


Detailed Description

+APR PRNG routines. +

+


Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  + +doxygen 1.5.2
+ + Modified: apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h-source.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h-source.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h-source.html Mon Sep 10 16:37:52 2007 @@ -1,24 +1,26 @@ - + Apache Portable Runtime: apr_ring.h Source File - +
+ +
+ +

apr_ring.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
 00002  * contributor license agreements.  See the NOTICE file distributed with
 00003  * this work for additional information regarding copyright ownership.
@@ -56,7 +58,7 @@
 00035 /*
 00036  * for offsetof()
 00037  */
-00038 #include "apr_general.h"
+00038 #include "apr_general.h"
 00039 
 00040 /**
 00041  * @defgroup apr_ring Ring Macro Implementations
@@ -90,8 +92,8 @@
 00069  */
 00070 #define APR_RING_ENTRY(elem)                                            \
 00071     struct {                                                            \
-00072         struct elem *next;                                              \
-00073         struct elem *prev;                                              \
+00072         struct elem * volatile next;                                    \
+00073         struct elem * volatile prev;                                    \
 00074     }
 00075 
 00076 /**
@@ -397,119 +399,143 @@
 00376  */
 00377 #define APR_RING_REMOVE(ep, link)                                       \
 00378     APR_RING_UNSPLICE((ep), (ep), link)
-00379 
-00380 
-00381 /* Debugging tools: */
-00382 
-00383 #ifdef APR_RING_DEBUG
-00384 #include <stdio.h>
-00385 #include <assert.h>
-00386 
-00387 #define APR_RING_CHECK_ONE(msg, ptr)                                    \
-00388         fprintf(stderr, "*** %s %p\n", msg, ptr)
-00389 
-00390 #define APR_RING_CHECK(hp, elem, link, msg)                             \
-00391         APR_RING_CHECK_ELEM(APR_RING_SENTINEL(hp, elem, link), elem, link, msg)
-00392 
-00393 #define APR_RING_CHECK_ELEM(ep, elem, link, msg) do {                   \
-00394         struct elem *start = (ep);                                      \
-00395         struct elem *here = start;                                      \
-00396         fprintf(stderr, "*** ring check start -- %s\n", msg);           \
-00397         do {                                                            \
-00398             fprintf(stderr, "\telem %p\n", here);                       \
-00399             fprintf(stderr, "\telem->next %p\n",                        \
-00400                     APR_RING_NEXT(here, link));                         \
-00401             fprintf(stderr, "\telem->prev %p\n",                        \
-00402                     APR_RING_PREV(here, link));                         \
-00403             fprintf(stderr, "\telem->next->prev %p\n",                  \
-00404                     APR_RING_PREV(APR_RING_NEXT(here, link), link));    \
-00405             fprintf(stderr, "\telem->prev->next %p\n",                  \
-00406                     APR_RING_NEXT(APR_RING_PREV(here, link), link));    \
-00407             if (APR_RING_PREV(APR_RING_NEXT(here, link), link) != here) { \
-00408                 fprintf(stderr, "\t*** elem->next->prev != elem\n");    \
-00409                 break;                                                  \
-00410             }                                                           \
-00411             if (APR_RING_NEXT(APR_RING_PREV(here, link), link) != here) { \
-00412                 fprintf(stderr, "\t*** elem->prev->next != elem\n");    \
-00413                 break;                                                  \
-00414             }                                                           \
-00415             here = APR_RING_NEXT(here, link);                           \
-00416         } while (here != start);                                        \
-00417         fprintf(stderr, "*** ring check end\n");                        \
-00418     } while (0)
-00419 
-00420 #define APR_RING_CHECK_CONSISTENCY(hp, elem, link)                      \
-00421         APR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\
-00422                                         elem, link)
-00423 
-00424 #define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do {            \
-00425         struct elem *start = (ep);                                      \
-00426         struct elem *here = start;                                      \
-00427         do {                                                            \
-00428             assert(APR_RING_PREV(APR_RING_NEXT(here, link), link) == here); \
-00429             assert(APR_RING_NEXT(APR_RING_PREV(here, link), link) == here); \
-00430             here = APR_RING_NEXT(here, link);                           \
-00431         } while (here != start);                                        \
-00432     } while (0)
-00433 
-00434 #else
-00435 /**
-00436  * Print a single pointer value to STDERR
-00437  *   (This is a no-op unless APR_RING_DEBUG is defined.)
-00438  * @param msg Descriptive message
-00439  * @param ptr Pointer value to print
-00440  */
-00441 #define APR_RING_CHECK_ONE(msg, ptr)
-00442 /**
-00443  * Dump all ring pointers to STDERR, starting with the head and looping all
-00444  * the way around the ring back to the head.  Aborts if an inconsistency
-00445  * is found.
-00446  *   (This is a no-op unless APR_RING_DEBUG is defined.)
-00447  * @param hp   Head of the ring
-00448  * @param elem The name of the element struct
-00449  * @param link The name of the APR_RING_ENTRY in the element struct
-00450  * @param msg  Descriptive message
-00451  */
-00452 #define APR_RING_CHECK(hp, elem, link, msg)
-00453 /**
-00454  * Loops around a ring and checks all the pointers for consistency.  Pops
-00455  * an assertion if any inconsistency is found.  Same idea as APR_RING_CHECK()
-00456  * except that it's silent if all is well.
-00457  *   (This is a no-op unless APR_RING_DEBUG is defined.)
-00458  * @param hp   Head of the ring
-00459  * @param elem The name of the element struct
-00460  * @param link The name of the APR_RING_ENTRY in the element struct
-00461  */
-00462 #define APR_RING_CHECK_CONSISTENCY(hp, elem, link)
-00463 /**
-00464  * Dump all ring pointers to STDERR, starting with the given element and
-00465  * looping all the way around the ring back to that element.  Aborts if
-00466  * an inconsistency is found.
-00467  *   (This is a no-op unless APR_RING_DEBUG is defined.)
-00468  * @param ep   The element
-00469  * @param elem The name of the element struct
-00470  * @param link The name of the APR_RING_ENTRY in the element struct
-00471  * @param msg  Descriptive message
-00472  */
-00473 #define APR_RING_CHECK_ELEM(ep, elem, link, msg)
-00474 /**
-00475  * Loops around a ring, starting with the given element, and checks all
-00476  * the pointers for consistency.  Pops an assertion if any inconsistency
-00477  * is found.  Same idea as APR_RING_CHECK_ELEM() except that it's silent
-00478  * if all is well.
-00479  *   (This is a no-op unless APR_RING_DEBUG is defined.)
-00480  * @param ep   The element
-00481  * @param elem The name of the element struct
-00482  * @param link The name of the APR_RING_ENTRY in the element struct
-00483  */
-00484 #define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link)
-00485 #endif
-00486 
-00487 /** @} */ 
-00488 
-00489 #endif /* !APR_RING_H */
-

Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +00379 +00380 /** +00381 * Iterate over a ring +00382 * @param ep The current element +00383 * @param head The head of the ring +00384 * @param elem The name of the element struct +00385 * @param link The name of the APR_RING_ENTRY in the element struct +00386 */ +00387 #define APR_RING_FOREACH(ep, head, elem, link) \ +00388 for (ep = APR_RING_FIRST(head); \ +00389 ep != APR_RING_SENTINEL(head, elem, link); \ +00390 ep = APR_RING_NEXT(ep, link)) +00391 +00392 /** +00393 * Iterate over a ring safe against removal of the current element +00394 * @param ep1 The current element +00395 * @param ep2 Iteration cursor +00396 * @param head The head of the ring +00397 * @param elem The name of the element struct +00398 * @param link The name of the APR_RING_ENTRY in the element struct +00399 */ +00400 #define APR_RING_FOREACH_SAFE(ep1, ep2, head, elem, link) \ +00401 for (ep1 = APR_RING_FIRST(head), ep2 = APR_RING_NEXT(ep1, link); \ +00402 ep1 != APR_RING_SENTINEL(head, elem, link); \ +00403 ep1 = ep2, ep2 = APR_RING_NEXT(ep1, link)) +00404 +00405 /* Debugging tools: */ +00406 +00407 #ifdef APR_RING_DEBUG +00408 #include <stdio.h> +00409 #include <assert.h> +00410 +00411 #define APR_RING_CHECK_ONE(msg, ptr) \ +00412 fprintf(stderr, "*** %s %p\n", msg, ptr) +00413 +00414 #define APR_RING_CHECK(hp, elem, link, msg) \ +00415 APR_RING_CHECK_ELEM(APR_RING_SENTINEL(hp, elem, link), elem, link, msg) +00416 +00417 #define APR_RING_CHECK_ELEM(ep, elem, link, msg) do { \ +00418 struct elem *start = (ep); \ +00419 struct elem *here = start; \ +00420 fprintf(stderr, "*** ring check start -- %s\n", msg); \ +00421 do { \ +00422 fprintf(stderr, "\telem %p\n", here); \ +00423 fprintf(stderr, "\telem->next %p\n", \ +00424 APR_RING_NEXT(here, link)); \ +00425 fprintf(stderr, "\telem->prev %p\n", \ +00426 APR_RING_PREV(here, link)); \ +00427 fprintf(stderr, "\telem->next->prev %p\n", \ +00428 APR_RING_PREV(APR_RING_NEXT(here, link), link)); \ +00429 fprintf(stderr, "\telem->prev->next %p\n", \ +00430 APR_RING_NEXT(APR_RING_PREV(here, link), link)); \ +00431 if (APR_RING_PREV(APR_RING_NEXT(here, link), link) != here) { \ +00432 fprintf(stderr, "\t*** elem->next->prev != elem\n"); \ +00433 break; \ +00434 } \ +00435 if (APR_RING_NEXT(APR_RING_PREV(here, link), link) != here) { \ +00436 fprintf(stderr, "\t*** elem->prev->next != elem\n"); \ +00437 break; \ +00438 } \ +00439 here = APR_RING_NEXT(here, link); \ +00440 } while (here != start); \ +00441 fprintf(stderr, "*** ring check end\n"); \ +00442 } while (0) +00443 +00444 #define APR_RING_CHECK_CONSISTENCY(hp, elem, link) \ +00445 APR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\ +00446 elem, link) +00447 +00448 #define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do { \ +00449 struct elem *start = (ep); \ +00450 struct elem *here = start; \ +00451 do { \ +00452 assert(APR_RING_PREV(APR_RING_NEXT(here, link), link) == here); \ +00453 assert(APR_RING_NEXT(APR_RING_PREV(here, link), link) == here); \ +00454 here = APR_RING_NEXT(here, link); \ +00455 } while (here != start); \ +00456 } while (0) +00457 +00458 #else +00459 /** +00460 * Print a single pointer value to STDERR +00461 * (This is a no-op unless APR_RING_DEBUG is defined.) +00462 * @param msg Descriptive message +00463 * @param ptr Pointer value to print +00464 */ +00465 #define APR_RING_CHECK_ONE(msg, ptr) +00466 /** +00467 * Dump all ring pointers to STDERR, starting with the head and looping all +00468 * the way around the ring back to the head. Aborts if an inconsistency +00469 * is found. +00470 * (This is a no-op unless APR_RING_DEBUG is defined.) +00471 * @param hp Head of the ring +00472 * @param elem The name of the element struct +00473 * @param link The name of the APR_RING_ENTRY in the element struct +00474 * @param msg Descriptive message +00475 */ +00476 #define APR_RING_CHECK(hp, elem, link, msg) +00477 /** +00478 * Loops around a ring and checks all the pointers for consistency. Pops +00479 * an assertion if any inconsistency is found. Same idea as APR_RING_CHECK() +00480 * except that it's silent if all is well. +00481 * (This is a no-op unless APR_RING_DEBUG is defined.) +00482 * @param hp Head of the ring +00483 * @param elem The name of the element struct +00484 * @param link The name of the APR_RING_ENTRY in the element struct +00485 */ +00486 #define APR_RING_CHECK_CONSISTENCY(hp, elem, link) +00487 /** +00488 * Dump all ring pointers to STDERR, starting with the given element and +00489 * looping all the way around the ring back to that element. Aborts if +00490 * an inconsistency is found. +00491 * (This is a no-op unless APR_RING_DEBUG is defined.) +00492 * @param ep The element +00493 * @param elem The name of the element struct +00494 * @param link The name of the APR_RING_ENTRY in the element struct +00495 * @param msg Descriptive message +00496 */ +00497 #define APR_RING_CHECK_ELEM(ep, elem, link, msg) +00498 /** +00499 * Loops around a ring, starting with the given element, and checks all +00500 * the pointers for consistency. Pops an assertion if any inconsistency +00501 * is found. Same idea as APR_RING_CHECK_ELEM() except that it's silent +00502 * if all is well. +00503 * (This is a no-op unless APR_RING_DEBUG is defined.) +00504 * @param ep The element +00505 * @param elem The name of the element struct +00506 * @param link The name of the APR_RING_ENTRY in the element struct +00507 */ +00508 #define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) +00509 #endif +00510 +00511 /** @} */ +00512 +00513 #endif /* !APR_RING_H */ +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2
Modified: apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__ring_8h.html Mon Sep 10 16:37:52 2007 @@ -1,24 +1,26 @@ - + Apache Portable Runtime: apr_ring.h File Reference - +
+ +
+ +

apr_ring.h File Reference

APR Rings. More...

#include "apr_general.h"
@@ -71,6 +73,10 @@ #define APR_RING_REMOVE(ep, link)   APR_RING_UNSPLICE((ep), (ep), link) +#define APR_RING_FOREACH(ep, head, elem, link) + +#define APR_RING_FOREACH_SAFE(ep1, ep2, head, elem, link) + #define APR_RING_CHECK_ONE(msg, ptr) #define APR_RING_CHECK(hp, elem, link, msg) @@ -85,8 +91,8 @@


Detailed Description

APR Rings.

-


Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2
Modified: apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h-source.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h-source.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h-source.html Mon Sep 10 16:37:52 2007 @@ -1,24 +1,26 @@ - + Apache Portable Runtime: apr_shm.h Source File - +
+ +
+ +

apr_shm.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
 00002  * contributor license agreements.  See the NOTICE file distributed with
 00003  * this work for additional information regarding copyright ownership.
@@ -43,9 +45,9 @@
 00022  * @brief APR Shared Memory Routines
 00023  */
 00024 
-00025 #include "apr.h"
-00026 #include "apr_pools.h"
-00027 #include "apr_errno.h"
+00025 #include "apr.h"
+00026 #include "apr_pools.h"
+00027 #include "apr_errno.h"
 00028 
 00029 #ifdef __cplusplus
 00030 extern "C" {
@@ -159,8 +161,8 @@
 00138 #endif
 00139 
 00140 #endif  /* APR_SHM_T */
-

Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2
Modified: apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h.html?rev=574406&r1=574405&r2=574406&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__shm_8h.html Mon Sep 10 16:37:52 2007 @@ -1,24 +1,26 @@ - + Apache Portable Runtime: apr_shm.h File Reference - +
+ +
+ +

apr_shm.h File Reference

APR Shared Memory Routines. More...

#include "apr.h"
@@ -52,8 +54,8 @@


Detailed Description

APR Shared Memory Routines.

-


Generated on Mon Apr 2 15:33:56 2007 for Apache Portable Runtime by  +
Generated on Tue Sep 11 09:20:20 2007 for Apache Portable Runtime by  -doxygen 1.5.1
+doxygen 1.5.2