summaryrefslogtreecommitdiffstats
path: root/include/ap_slotmem.h
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2009-01-02 20:58:08 +0100
committerJim Jagielski <jim@apache.org>2009-01-02 20:58:08 +0100
commit005313c3ef9905d57b5f760e679a839c8eb6858f (patch)
tree808485fc5ffe2e119347ea2e265935b43ccbd8a5 /include/ap_slotmem.h
parentUse default object file in APACHE_MODULE calls (diff)
downloadapache2-005313c3ef9905d57b5f760e679a839c8eb6858f.tar.xz
apache2-005313c3ef9905d57b5f760e679a839c8eb6858f.zip
Add new struct element: name...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730833 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_slotmem.h')
-rw-r--r--include/ap_slotmem.h112
1 files changed, 57 insertions, 55 deletions
diff --git a/include/ap_slotmem.h b/include/ap_slotmem.h
index 2abdefaa05..2e96659557 100644
--- a/include/ap_slotmem.h
+++ b/include/ap_slotmem.h
@@ -62,61 +62,63 @@ typedef struct ap_slotmem_t ap_slotmem_t;
typedef apr_status_t ap_slotmem_callback_fn_t(void* mem, void *data, apr_pool_t *pool);
struct ap_slotmem_storage_method {
-/**
- * call the callback on all worker slots
- * @param s ap_slotmem_t to use.
- * @param funct callback function to call for each element.
- * @param data parameter for the callback function.
- * @param pool is pool used to create scoreboard
- * @return APR_SUCCESS if all went well
- */
-apr_status_t (* slotmem_do)(ap_slotmem_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool);
-
-/**
- * create a new slotmem with each item size is item_size.
- * This would create shared memory, basically.
- * @param pointer to store the address of the scoreboard.
- * @param name is a key used for debugging and in mod_status output or allow another process to share this space.
- * @param item_size size of each item
- * @param item_num number of item to create.
- * @param pool is pool used to create scoreboard
- * @return APR_SUCCESS if all went well
- */
-apr_status_t (* slotmem_create)(ap_slotmem_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool);
-
-/**
- * attach to an existing slotmem.
- * This would attach to shared memory, basically.
- * @param pointer to store the address of the scoreboard.
- * @param name is a key used for debugging and in mod_status output or allow another process to share this space.
- * @param item_size size of each item
- * @param item_num max number of item.
- * @param pool is pool to memory allocate.
- * @return APR_SUCCESS if all went well
- */
-apr_status_t (* slotmem_attach)(ap_slotmem_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool);
-/**
- * get the memory associated with this worker slot.
- * @param s ap_slotmem_t to use.
- * @param item_id item to return for 0 to item_num
- * @param mem address to store the pointer to the slot
- * @return APR_SUCCESS if all went well
- */
-apr_status_t (* slotmem_mem)(ap_slotmem_t *s, int item_id, void**mem);
-/**
- * lock the memory segment
- * NOTE: All slots share the same mutex
- * @param s ap_slotmem_t to use
- * @return APR_SUCCESS if all went well
- */
-apr_status_t (* slotmem_lock)(ap_slotmem_t *s);
-/**
- * unlock the memory segment
- * NOTE: All slots share the same mutex
- * @param s ap_slotmem_t to use.
- * @return APR_SUCCESS if all went well
- */
-apr_status_t (* slotmem_unlock)(ap_slotmem_t *s);
+ /*
+ * Name of the provider method
+ */
+ const char *name;
+ /**
+ * call the callback on all worker slots
+ * @param s ap_slotmem_t to use.
+ * @param funct callback function to call for each element.
+ * @param data parameter for the callback function.
+ * @param pool is pool used to create scoreboard
+ * @return APR_SUCCESS if all went well
+ */
+ apr_status_t (* slotmem_do)(ap_slotmem_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool);
+ /**
+ * create a new slotmem with each item size is item_size.
+ * This would create shared memory, basically.
+ * @param pointer to store the address of the scoreboard.
+ * @param name is a key used for debugging and in mod_status output or allow another process to share this space.
+ * @param item_size size of each item
+ * @param item_num number of item to create.
+ * @param pool is pool used to create scoreboard
+ * @return APR_SUCCESS if all went well
+ */
+ apr_status_t (* slotmem_create)(ap_slotmem_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool);
+ /**
+ * attach to an existing slotmem.
+ * This would attach to shared memory, basically.
+ * @param pointer to store the address of the scoreboard.
+ * @param name is a key used for debugging and in mod_status output or allow another process to share this space.
+ * @param item_size size of each item
+ * @param item_num max number of item.
+ * @param pool is pool to memory allocate.
+ * @return APR_SUCCESS if all went well
+ */
+ apr_status_t (* slotmem_attach)(ap_slotmem_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool);
+ /**
+ * get the memory associated with this worker slot.
+ * @param s ap_slotmem_t to use.
+ * @param item_id item to return for 0 to item_num
+ * @param mem address to store the pointer to the slot
+ * @return APR_SUCCESS if all went well
+ */
+ apr_status_t (* slotmem_mem)(ap_slotmem_t *s, int item_id, void**mem);
+ /**
+ * lock the memory segment
+ * NOTE: All slots share the same mutex
+ * @param s ap_slotmem_t to use
+ * @return APR_SUCCESS if all went well
+ */
+ apr_status_t (* slotmem_lock)(ap_slotmem_t *s);
+ /**
+ * unlock the memory segment
+ * NOTE: All slots share the same mutex
+ * @param s ap_slotmem_t to use.
+ * @return APR_SUCCESS if all went well
+ */
+ apr_status_t (* slotmem_unlock)(ap_slotmem_t *s);
};
typedef struct ap_slotmem_storage_method ap_slotmem_storage_method;