]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
dditional docco changes... No functional changes
authorJim Jagielski <jim@apache.org>
Fri, 15 May 2009 18:21:12 +0000 (18:21 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 15 May 2009 18:21:12 +0000 (18:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775272 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_slotmem_plain.xml
docs/manual/mod/mod_slotmem_shm.xml
include/ap_slotmem.h

index efebe59304dd8ecb0b9c19198c3c7ad0bd6fa0a3..1c70f3ce8749a18e37127308882d1a8bce6f61cd 100644 (file)
     <module>mod_slotmem_shm</module>.
     </p>
 
-    <p><code>mod_slotmem_plain</code> provides the following
-    API functions:
+    <p><code>mod_slotmem_plain</code> provides the following API functions:
     </p>
 
     <dl>
-      <dt>apr_status_t do(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)</dt>
+      <dt>apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)</dt>
       <dd>call the callback on all worker slots</dd>
 
-      <dt>apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool)</dt>
+      <dt>apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)</dt>
       <dd>create a new slotmem with each item size is item_size.</dd>
 
-      <dt>apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool)</dt>
+      <dt>apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)</dt>
       <dd>attach to an existing slotmem.</dd>
 
-      <dt>apr_status_t dptr(ap_slotmem_instance_t *s, int item_id, void**mem)</dt>
+      <dt>apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)</dt>
       <dd>get the direct pointer to the memory associated with this worker slot.</dd>
 
-      <dt>apr_status_t lock(ap_slotmem_instance_t *s)</dt>
-      <dd>lock the memory segment</dd>
+      <dt>apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)</dt>
+      <dd>get/read the memory from this slot to dest</dd>
 
-      <dt>(apr_status_t unlock(ap_slotmem_instance_t *s)</dt>
-      <dd>unlock the memory segment</dd>
+      <dt>apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)</dt>
+      <dd>put/write the data from src to this slot</dd>
+
+      <dt>unsigned int num_slots(ap_slotmem_instance_t *s)</dt>
+      <dd>return the total number of slots in the segment</dd>
+
+      <dt>apr_size_t slot_size(ap_slotmem_instance_t *s)</dt>
+      <dd>return the total data size, in bytes, of a slot in the segment</dd>
+
+      <dt>apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
+      <dd>grab or allocate a slot and mark as in-use (does not do any data copying)</dd>
+
+      <dt>apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
+      <dd>release or free a slot and mark as not in-use (does not do any data copying)</dd>
     </dl>
 
 </summary>
index fca2fa3ec2a4b3462fc30093824199f6984b05c0..493842056971e7f910b7462eecf9f6813de3e13c 100644 (file)
     in which the datasets are organized in "slots."
     </p>
 
-    <p><code>mod_slotmem_shm</code> provides the following
-    API functions:
+    <p><code>mod_slotmem_shm</code> provides the following API functions:
     </p>
 
     <dl>
-      <dt>apr_status_t do(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)</dt>
+      <dt>apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)</dt>
       <dd>call the callback on all worker slots</dd>
 
-      <dt>apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, int item_num, apr_pool_t *pool)</dt>
+      <dt>apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)</dt>
       <dd>create a new slotmem with each item size is item_size.</dd>
 
-      <dt>apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, int *item_num, apr_pool_t *pool)</dt>
+      <dt>apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)</dt>
       <dd>attach to an existing slotmem.</dd>
 
-      <dt>apr_status_t dptr(ap_slotmem_instance_t *s, int item_id, void**mem)</dt>
+      <dt>apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)</dt>
       <dd>get the direct pointer to the memory associated with this worker slot.</dd>
 
-      <dt>apr_status_t lock(ap_slotmem_instance_t *s)</dt>
-      <dd>lock the memory segment</dd>
+      <dt>apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)</dt>
+      <dd>get/read the memory from this slot to dest</dd>
 
-      <dt>(apr_status_t unlock(ap_slotmem_instance_t *s)</dt>
-      <dd>unlock the memory segment</dd>
+      <dt>apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)</dt>
+      <dd>put/write the data from src to this slot</dd>
+
+      <dt>unsigned int num_slots(ap_slotmem_instance_t *s)</dt>
+      <dd>return the total number of slots in the segment</dd>
+
+      <dt>apr_size_t slot_size(ap_slotmem_instance_t *s)</dt>
+      <dd>return the total data size, in bytes, of a slot in the segment</dd>
+
+      <dt>apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
+      <dd>grab or allocate a slot and mark as in-use (does not do any data copying)</dd>
+
+      <dt>apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);</dt>
+      <dd>release or free a slot and mark as not in-use (does not do any data copying)</dd>
     </dl>
 
 </summary>
index 3863810b685005192a4402acfd01e485f21dcb2c..0705e92a96cd7c863cd622d8d93d272859b5780e 100644 (file)
@@ -124,7 +124,7 @@ struct ap_slotmem_provider_t {
      */
     apr_status_t (* dptr)(ap_slotmem_instance_t *s, unsigned int item_id, void**mem);
     /**
-     * retrieve the memory associated with this worker slot.
+     * get/read the memory associated with this worker slot.
      * @param s ap_slotmem_instance_t to use.
      * @param item_id item to return for 0 to item_num
      * @param dest address to store the data
@@ -133,7 +133,7 @@ struct ap_slotmem_provider_t {
      */
     apr_status_t (* get)(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len);
     /**
-     * store the memory associated with this worker slot.
+     * put/write the memory associated with this worker slot.
      * @param s ap_slotmem_instance_t to use.
      * @param item_id item to return for 0 to item_num
      * @param src address of the data to store in the slot