summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-08-12 05:10:28 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-08-12 05:10:28 +0000
commitb38968db758bfe9792866b130483308023c2c671 (patch)
tree6f080362cdeb86ee29271cfbf576c6d395595ac2
parentcfcf66ee1af8a146d13b19d65765db8695f144f0 (diff)
downloadlibapr-b38968db758bfe9792866b130483308023c2c671.tar.gz
Add doxygen work for SMS code.
Submitted by: Ian Holsman <ianh@cnet.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62144 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/apr_sms.h17
-rw-r--r--memory/unix/sms_private.h51
2 files changed, 47 insertions, 21 deletions
diff --git a/include/apr_sms.h b/include/apr_sms.h
index 098b04b72..e33407896 100644
--- a/include/apr_sms.h
+++ b/include/apr_sms.h
@@ -60,9 +60,24 @@
* May 2001
*/
+/**
+ * @file apr_sms.h
+ * @brief APR SMS Memory routines
+ */
+/**
+ * @defgroup SMS SMS Shared Memory allocation system
+ * @ingroup APR
+ * @{
+ */
+
#ifndef APR_SMS_H
#define APR_SMS_H
+/**
+ * @typedef apr_sms_t
+ * @brief holds the internal details required to implement a SMS
+ * @see sms_private.h
+ */
typedef struct apr_sms_t apr_sms_t;
#include "apr.h"
@@ -419,6 +434,6 @@ APR_DECLARE(void) apr_sms_dump_stats(apr_sms_t *sms);
#ifdef __cplusplus
}
#endif
-
+/** @} */
#endif /* !APR_SMS_H */
diff --git a/memory/unix/sms_private.h b/memory/unix/sms_private.h
index 9b4791fcd..4adee8c1e 100644
--- a/memory/unix/sms_private.h
+++ b/memory/unix/sms_private.h
@@ -51,7 +51,17 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
-
+/**
+ * @file sms_private.h
+ * @brief SMS private definitions/routines
+ * @internal
+ */
+/**
+ *
+ * @defgroup SMS_Private Private routines
+ * @ingroup SMS
+ * @{
+ */
#ifndef SMS_PRIVATE_H
#define SMS_PRIVATE_H
@@ -66,33 +76,35 @@ extern "C" {
#endif
/**
- * The memory system structure
+ * @struct apr_sms_t
+ * @brief The SMS memory system structure
*/
struct apr_sms_t
{
- apr_sms_t *parent;
- apr_sms_t *child;
- apr_sms_t *sibling;
+ apr_sms_t *parent; /**< parent of the current SMS */
+ apr_sms_t *child; /**< children of the current SMS */
+ apr_sms_t *sibling; /**< next SMS at the same level */
apr_sms_t **ref;
apr_sms_t *accounting;
- const char *identity; /* a string identifying the module */
+ const char *identity; /**< a string identifying the module */
apr_pool_t *pool;
apr_lock_t *sms_lock;
struct apr_sms_cleanup *cleanups;
- void * (*malloc_fn) (apr_sms_t *sms, apr_size_t size);
- void * (*calloc_fn) (apr_sms_t *sms, apr_size_t size);
- void * (*realloc_fn) (apr_sms_t *sms, void *memory,
- apr_size_t size);
- apr_status_t (*free_fn) (apr_sms_t *sms, void *memory);
- apr_status_t (*reset_fn) (apr_sms_t *sms);
- apr_status_t (*pre_destroy_fn) (apr_sms_t *sms);
- apr_status_t (*destroy_fn) (apr_sms_t *sms);
- apr_status_t (*lock_fn) (apr_sms_t *sms);
- apr_status_t (*unlock_fn) (apr_sms_t *sms);
+ void * (*malloc_fn) (apr_sms_t *sms, apr_size_t size); /**< malloc fn for this SMS */
+ void * (*calloc_fn) (apr_sms_t *sms, apr_size_t size); /**< calloc fn for this SMS */
+ void * (*realloc_fn) (apr_sms_t *sms, void *memory,
+ apr_size_t size); /**< realloc fn for this SMS */
+ apr_status_t (*free_fn) (apr_sms_t *sms, void *memory); /**< free fn */
+ apr_status_t (*reset_fn) (apr_sms_t *sms); /**< reset fn */
+ apr_status_t (*pre_destroy_fn) (apr_sms_t *sms); /**< called before destroying memory */
+ apr_status_t (*destroy_fn) (apr_sms_t *sms); /**< function to destory
+the SMS */
+ apr_status_t (*lock_fn) (apr_sms_t *sms); /**< locking function */
+ apr_status_t (*unlock_fn) (apr_sms_t *sms); /**< unlocking function */
apr_status_t (*apr_abort)(int retcode);
struct apr_hash_t *prog_data;
@@ -120,14 +132,12 @@ struct apr_sms_t
/**
* Initialize a memory system
- * @caution Call this function as soon as you have obtained a block of memory
+ * @warning Call this function as soon as you have obtained a block of memory
* to serve as a memory system structure from your
* apr_xxx_sms_create. Only use this function when you are
* implementing a memory system.
* @param sms The memory system created
* @param parent_sms The parent memory system
- * @deffunc apr_status_t apr_sms_init(apr_sms_t *sms,
- * apr_sms_t *parent_sms)
*/
APR_DECLARE(apr_status_t) apr_sms_init(apr_sms_t *sms,
apr_sms_t *parent_sms);
@@ -136,6 +146,7 @@ APR_DECLARE(apr_status_t) apr_sms_init(apr_sms_t *sms,
* Do post init work that needs the sms to have been fully
* initialised.
* @param sms The memory system to use
+ * @return apr_status_t
*/
APR_DECLARE(apr_status_t) apr_sms_post_init(apr_sms_t *sms);
@@ -143,6 +154,6 @@ APR_DECLARE(apr_status_t) apr_sms_post_init(apr_sms_t *sms);
#ifdef __cplusplus
}
#endif
-
+/** @} */
#endif /* !SMS_PRIVATE_H */