]> granicus.if.org Git - apache/commitdiff
"officially" add grab/release to slotmem provider API
authorJim Jagielski <jim@apache.org>
Fri, 15 May 2009 18:07:17 +0000 (18:07 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 15 May 2009 18:07:17 +0000 (18:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775269 13f79535-47bb-0310-9956-ffa450edef68

include/ap_slotmem.h

index 3e957dab6ecd77fdd62eb81654d9224ca1ae293b..48cd549da6f61a4ff7f88ca9ac5ddc9de7f0f9ff 100644 (file)
@@ -153,6 +153,20 @@ struct ap_slotmem_provider_t {
      * @return size of slot
      */
     apr_size_t (* slot_size)(ap_slotmem_instance_t *s);
+    /**
+     * grab (or alloc) the slot associated with this item_id
+     * @param s ap_slotmem_t to use.
+     * @param item_id item allocate and mark as in-use
+     * @return APR_SUCCESS if all went well
+     */
+    apr_status_t (* grab)(ap_slotmem_instance_t *s, unsigned int item_id);
+    /**
+     * release (or free) the slot associated with this item_id
+     * @param s ap_slotmem_t to use.
+     * @param item_id item free and mark as no longer in-use
+     * @return APR_SUCCESS if all went well
+     */
+    apr_status_t (* release)(ap_slotmem_instance_t *s, unsigned int item_id);
 };
 
 typedef struct ap_slotmem_provider_t ap_slotmem_provider_t;