]> granicus.if.org Git - apache/commitdiff
add API back from r774454
authorJim Jagielski <jim@apache.org>
Wed, 13 May 2009 19:44:56 +0000 (19:44 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 13 May 2009 19:44:56 +0000 (19:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774500 13f79535-47bb-0310-9956-ffa450edef68

include/ap_slotmem.h
modules/mem/mod_plainmem.c
modules/mem/mod_sharedmem.c
server/slotmem.c

index aac7ea046ff719516df628f1bc793cac5ad67e74..e59ef72096c8c970229cd4204a379f3bc410736e 100644 (file)
@@ -100,6 +100,14 @@ struct ap_slotmem_storage_method {
      * @return APR_SUCCESS if all went well
      */
     apr_status_t (* slotmem_attach)(ap_slotmem_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool);
+    /**
+     * get the memory ptr 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, unsigned int item_id, void**mem);
     /**
      * retrieve the memory associated with this worker slot.
      * @param s ap_slotmem_t to use.
@@ -189,6 +197,15 @@ AP_DECLARE(apr_status_t) ap_slotmem_create(ap_slotmem_storage_method *sm, ap_slo
  * @return APR_SUCCESS if all went well
  */
 AP_DECLARE(apr_status_t) ap_slotmem_attach(ap_slotmem_storage_method *sm, ap_slotmem_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool);
+/**
+ * get the memory associated with this worker slot.
+ * @param sm ap_slotmem_storage_method provider obtained
+ * @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
+ */
+AP_DECLARE(apr_status_t) ap_slotmem_mem(ap_slotmem_storage_method *sm, ap_slotmem_t *s, unsigned int item_id, void**mem);
 /**
  * retrieve the memory associated with this worker slot.
  * @param sm ap_slotmem_storage_method provider obtained
index 848f52026c7eb78dac01fd1aea2e005dc0f20693..af1a3ffa50c08a83344b20c62bc4dc5590db6466 100644 (file)
@@ -192,6 +192,7 @@ static const ap_slotmem_storage_method storage = {
     &slotmem_do,
     &slotmem_create,
     &slotmem_attach,
+    &slotmem_mem,
     &slotmem_get,
     &slotmem_put,
     &slotmem_num_slots,
index c7113041cf33e261e5533873ccb02e38f9f3676b..902066902049c33432c653d7581a8eed99a87c84 100644 (file)
@@ -555,6 +555,7 @@ static const ap_slotmem_storage_method storage = {
     &slotmem_do,
     &slotmem_create,
     &slotmem_attach,
+    &slotmem_mem,
     &slotmem_get,
     &slotmem_put,
     &slotmem_num_slots,
index d7ddd06760e86176867872c8deb49ebcd91da03c..2517e2f934851ff56664458ee37bb28cf8cf320f 100644 (file)
@@ -56,6 +56,12 @@ AP_DECLARE(apr_status_t) ap_slotmem_attach(ap_slotmem_storage_method *sm,
     return (sm->slotmem_attach(new, name, item_size, item_num, pool));
 }
 
+AP_DECLARE(apr_status_t) ap_slotmem_mem(ap_slotmem_storage_method *sm,
+                                        ap_slotmem_t *s, unsigned int item_id, void**mem)
+{
+    return (sm->slotmem_mem(s, item_id, mem));
+}
+
 AP_DECLARE(apr_status_t) ap_slotmem_get(ap_slotmem_storage_method *sm,
                                         ap_slotmem_t *s, unsigned int item_id,
                                         unsigned char *dest, apr_size_t dest_len)