]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remove ap_slotmem_lock / ap_slotmem_unlock from the slotmem API.
authorJean-Frederic Clere <jfclere@apache.org>
Mon, 4 May 2009 10:20:42 +0000 (10:20 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Mon, 4 May 2009 10:20:42 +0000 (10:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771262 13f79535-47bb-0310-9956-ffa450edef68

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

index 48efacf62620a2ee1d70b8069884845d2bec5d3a..a9578a18e003e4417e5a191ab339579d74b83a96 100644 (file)
@@ -103,20 +103,6 @@ struct ap_slotmem_storage_method {
      * @return APR_SUCCESS if all went well
      */
     apr_status_t (* slotmem_mem)(ap_slotmem_t *s, unsigned 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);
     /**
      * retrieve the memory associated with this worker slot.
      * @param s ap_slotmem_t to use.
@@ -202,22 +188,6 @@ AP_DECLARE(apr_status_t) ap_slotmem_attach(ap_slotmem_storage_method *sm, ap_slo
  * @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);
-/**
- * lock the memory segment
- * NOTE: All slots share the same mutex
- * @param sm ap_slotmem_storage_method provider obtained
- * @param s ap_slotmem_t to use
- * @return APR_SUCCESS if all went well
- */
-AP_DECLARE(apr_status_t) ap_slotmem_lock(ap_slotmem_storage_method *sm, ap_slotmem_t *s);
-/**
- * unlock the memory segment
- * NOTE: All slots share the same mutex
- * @param sm ap_slotmem_storage_method provider obtained
- * @param s ap_slotmem_t to use.
- * @return APR_SUCCESS if all went well
- */
-AP_DECLARE(apr_status_t) ap_slotmem_unlock(ap_slotmem_storage_method *sm, ap_slotmem_t *s);
 /**
  * retrieve the memory associated with this worker slot.
  * @param sm ap_slotmem_storage_method provider obtained
index becc4fa2585de8658c145d3689084ee08270c0d8..3d9e160c77cbb34af63093766c78a6d7b1715cf6 100644 (file)
@@ -351,6 +351,7 @@ static apr_status_t slotmem_mem(ap_slotmem_t *slot, unsigned int id, void **mem)
     return APR_SUCCESS;
 }
 
+/* XXX: Those 2 should be removed */
 static apr_status_t slotmem_lock(ap_slotmem_t *slot)
 {
     return (apr_global_mutex_lock(slot->smutex));
@@ -395,8 +396,6 @@ static const ap_slotmem_storage_method storage = {
     &slotmem_create,
     &slotmem_attach,
     &slotmem_mem,
-    &slotmem_lock,
-    &slotmem_unlock,
     &slotmem_get,
     &slotmem_put
 };
index af034b82eac90afbce1d1a0f535544790afa20a2..8d4e31fd86f6522f602d08fa2a3a35af6589794a 100644 (file)
@@ -61,18 +61,6 @@ AP_DECLARE(apr_status_t) ap_slotmem_mem(ap_slotmem_storage_method *sm,
     return (sm->slotmem_mem(s, item_id, mem));
 }
 
-AP_DECLARE(apr_status_t) ap_slotmem_lock(ap_slotmem_storage_method *sm,
-                                         ap_slotmem_t *s)
-{
-    return (sm->slotmem_lock(s));
-}
-
-AP_DECLARE(apr_status_t) ap_slotmem_unlock(ap_slotmem_storage_method *sm,
-                                           ap_slotmem_t *s)
-{
-    return (sm->slotmem_unlock(s));
-}
-
 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)