You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2009/05/13 21:45:00 UTC
svn commit: r774500 - in /httpd/httpd/trunk: include/ap_slotmem.h
modules/mem/mod_plainmem.c modules/mem/mod_sharedmem.c server/slotmem.c
Author: jim
Date: Wed May 13 19:44:56 2009
New Revision: 774500
URL: http://svn.apache.org/viewvc?rev=774500&view=rev
Log:
add API back from r774454
Modified:
httpd/httpd/trunk/include/ap_slotmem.h
httpd/httpd/trunk/modules/mem/mod_plainmem.c
httpd/httpd/trunk/modules/mem/mod_sharedmem.c
httpd/httpd/trunk/server/slotmem.c
Modified: httpd/httpd/trunk/include/ap_slotmem.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_slotmem.h?rev=774500&r1=774499&r2=774500&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_slotmem.h (original)
+++ httpd/httpd/trunk/include/ap_slotmem.h Wed May 13 19:44:56 2009
@@ -101,6 +101,14 @@
*/
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.
* @param item_id item to return for 0 to item_num
@@ -190,6 +198,15 @@
*/
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
* @param s ap_slotmem_t to use.
Modified: httpd/httpd/trunk/modules/mem/mod_plainmem.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_plainmem.c?rev=774500&r1=774499&r2=774500&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/mod_plainmem.c (original)
+++ httpd/httpd/trunk/modules/mem/mod_plainmem.c Wed May 13 19:44:56 2009
@@ -192,6 +192,7 @@
&slotmem_do,
&slotmem_create,
&slotmem_attach,
+ &slotmem_mem,
&slotmem_get,
&slotmem_put,
&slotmem_num_slots,
Modified: httpd/httpd/trunk/modules/mem/mod_sharedmem.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_sharedmem.c?rev=774500&r1=774499&r2=774500&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/mod_sharedmem.c (original)
+++ httpd/httpd/trunk/modules/mem/mod_sharedmem.c Wed May 13 19:44:56 2009
@@ -555,6 +555,7 @@
&slotmem_do,
&slotmem_create,
&slotmem_attach,
+ &slotmem_mem,
&slotmem_get,
&slotmem_put,
&slotmem_num_slots,
Modified: httpd/httpd/trunk/server/slotmem.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/slotmem.c?rev=774500&r1=774499&r2=774500&view=diff
==============================================================================
--- httpd/httpd/trunk/server/slotmem.c (original)
+++ httpd/httpd/trunk/server/slotmem.c Wed May 13 19:44:56 2009
@@ -56,6 +56,12 @@
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)