From 1f4fe314e956096e73030d80217cf5f4c64c651c Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Mon, 4 May 2009 10:20:42 +0000 Subject: [PATCH] Remove ap_slotmem_lock / ap_slotmem_unlock from the slotmem API. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771262 13f79535-47bb-0310-9956-ffa450edef68 --- include/ap_slotmem.h | 30 ------------------------------ modules/mem/mod_sharedmem.c | 3 +-- server/slotmem.c | 12 ------------ 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/include/ap_slotmem.h b/include/ap_slotmem.h index 48efacf626..a9578a18e0 100644 --- a/include/ap_slotmem.h +++ b/include/ap_slotmem.h @@ -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 diff --git a/modules/mem/mod_sharedmem.c b/modules/mem/mod_sharedmem.c index becc4fa258..3d9e160c77 100644 --- a/modules/mem/mod_sharedmem.c +++ b/modules/mem/mod_sharedmem.c @@ -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 }; diff --git a/server/slotmem.c b/server/slotmem.c index af034b82ea..8d4e31fd86 100644 --- a/server/slotmem.c +++ b/server/slotmem.c @@ -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) -- 2.50.1