Author: jim
Date: Thu Jan 1 12:17:56 2009
New Revision: 730597
URL: http://svn.apache.org/viewvc?rev=730597&view=rev
Log:
Transition mod_slotmem to ap_slotmem... just monkeying
with the locations, etc. now... adding getter/setter
will be over the weekend and post-2.3.1 but I figured
at least do this beforehand...
I love trunk :)
Added:
httpd/httpd/trunk/include/ap_slotmem.h
- copied, changed from r730595, httpd/httpd/trunk/modules/mem/mod_slotmem.h
httpd/httpd/trunk/modules/mem/mod_plainmem.c
- copied, changed from r730595, httpd/httpd/trunk/modules/mem/providers/mod_plainmem.c
httpd/httpd/trunk/modules/mem/mod_sharedmem.c
- copied, changed from r730595, httpd/httpd/trunk/modules/mem/providers/mod_sharedmem.c
httpd/httpd/trunk/server/slotmem.c (contents, props changed)
- copied, changed from r730595, httpd/httpd/trunk/modules/mem/mod_slotmem.c
Removed:
httpd/httpd/trunk/modules/mem/mod_slotmem.c
httpd/httpd/trunk/modules/mem/mod_slotmem.h
httpd/httpd/trunk/modules/mem/providers/
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/mem/Makefile.in
httpd/httpd/trunk/modules/mem/config.m4
httpd/httpd/trunk/server/Makefile.in
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=730597&r1=730596&r2=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Jan 1 12:17:56 2009
@@ -2,7 +2,7 @@
Changes with Apache 2.3.1
[ When backported to 2.2.x, remove entry from this file ]
- *) mod_slotmem: Add in new slot-based memory access API module, including
+ *) ap_slotmem: Add in new slot-based memory access API impl., including
2 providers (mod_sharedmem and mod_plainmem) [Jim Jagielski,
Jean-Frederic Clere, Brian Akins <brian.akins turner.com>]
Copied: httpd/httpd/trunk/include/ap_slotmem.h (from r730595, httpd/httpd/trunk/modules/mem/mod_slotmem.h)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_slotmem.h?p2=httpd/httpd/trunk/include/ap_slotmem.h&p1=httpd/httpd/trunk/modules/mem/mod_slotmem.h&r1=730595&r2=730597&rev=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/mod_slotmem.h (original)
+++ httpd/httpd/trunk/include/ap_slotmem.h Thu Jan 1 12:17:56 2009
@@ -48,23 +48,10 @@
#include <unistd.h> /* for getpid() */
#endif
-#define SLOTMEM_STORAGE "slotmem"
+#define AP_SLOTMEM_STORAGE "slotmem"
typedef struct ap_slotmem_t ap_slotmem_t;
-struct ap_slotmem_t {
- char *name; /* per segment name */
- void *shm; /* ptr to memory segment (apr_shm_t *) */
- void *base; /* data set start */
- apr_size_t size; /* size of each memory slot */
- int num; /* number of mem slots */
- apr_pool_t *gpool; /* per segment global pool */
- apr_global_mutex_t *smutex; /* mutex */
- void *context; /* general purpose storage */
- struct ap_slotmem_t *next; /* location of next allocated segment */
-};
-
-
/**
* callback function used for slotmem.
* @param mem is the memory associated with a worker.
Modified: httpd/httpd/trunk/modules/mem/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/Makefile.in?rev=730597&r1=730596&r2=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/Makefile.in (original)
+++ httpd/httpd/trunk/modules/mem/Makefile.in Thu Jan 1 12:17:56 2009
@@ -1,2 +1,3 @@
-
+# a modules Makefile has no explicit targets -- they will be defined by
+# whatever modules are enabled. just grab special.mk to deal with this.
include $(top_srcdir)/build/special.mk
Modified: httpd/httpd/trunk/modules/mem/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/config.m4?rev=730597&r1=730596&r2=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/config.m4 (original)
+++ httpd/httpd/trunk/modules/mem/config.m4 Thu Jan 1 12:17:56 2009
@@ -3,19 +3,9 @@
dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
APACHE_MODPATH_INIT(mem)
-if test "$enable_slotmem" = "shared"; then
- slotmem_mods_enable=shared
-elif test "$enable_slotmem" = "yes"; then
- slotmem_mods_enable=yes
-else
- slotmem_mods_enable=no
-fi
-slotmem_objs="mod_slotmem.lo"
-
-APACHE_MODULE(slotmem, slot-based memory API using providers, $slotmem_objs, , most)
-
-# Ensure that other modules can pick up mod_slotmem.h
-APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
+sharedmem_objs="mod_sharedmem.lo"
+APACHE_MODULE(sharedmem, memslot provider that uses shared memory, $sharedmem_objs, , most)
+APACHE_MODULE(plainmem, memslot provider that uses plain memory, , , no)
APACHE_MODPATH_FINISH
Copied: httpd/httpd/trunk/modules/mem/mod_plainmem.c (from r730595, httpd/httpd/trunk/modules/mem/providers/mod_plainmem.c)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_plainmem.c?p2=httpd/httpd/trunk/modules/mem/mod_plainmem.c&p1=httpd/httpd/trunk/modules/mem/providers/mod_plainmem.c&r1=730595&r2=730597&rev=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/providers/mod_plainmem.c (original)
+++ httpd/httpd/trunk/modules/mem/mod_plainmem.c Thu Jan 1 12:17:56 2009
@@ -18,7 +18,18 @@
* This one uses plain memory.
*/
-#include "mod_slotmem.h"
+#include "ap_slotmem.h"
+
+struct ap_slotmem_t {
+ char *name; /* per segment name */
+ void *base; /* data set start */
+ apr_size_t size; /* size of each memory slot */
+ int num; /* number of mem slots */
+ apr_pool_t *gpool; /* per segment global pool */
+ apr_global_mutex_t *smutex; /* mutex */
+ struct ap_slotmem_t *next; /* location of next allocated segment */
+};
+
/* global pool and list of slotmem we are handling */
static struct ap_slotmem_t *globallistmem = NULL;
@@ -156,7 +167,7 @@
static void ap_plainmem_register_hook(apr_pool_t *p)
{
/* XXX: static const char * const prePos[] = { "mod_slotmem.c", NULL }; */
- ap_register_provider(p, SLOTMEM_STORAGE, "plain", "0", &storage);
+ ap_register_provider(p, AP_SLOTMEM_STORAGE, "plain", "0", &storage);
ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
}
Copied: httpd/httpd/trunk/modules/mem/mod_sharedmem.c (from r730595, httpd/httpd/trunk/modules/mem/providers/mod_sharedmem.c)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mem/mod_sharedmem.c?p2=httpd/httpd/trunk/modules/mem/mod_sharedmem.c&p1=httpd/httpd/trunk/modules/mem/providers/mod_sharedmem.c&r1=730595&r2=730597&rev=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/providers/mod_sharedmem.c (original)
+++ httpd/httpd/trunk/modules/mem/mod_sharedmem.c Thu Jan 1 12:17:56 2009
@@ -18,7 +18,19 @@
* This one uses shared memory.
*/
-#include "mod_slotmem.h"
+#include "ap_slotmem.h"
+
+struct ap_slotmem_t {
+ char *name; /* per segment name */
+ void *shm; /* ptr to memory segment (apr_shm_t *) */
+ void *base; /* data set start */
+ apr_size_t size; /* size of each memory slot */
+ int num; /* number of mem slots */
+ apr_pool_t *gpool; /* per segment global pool */
+ apr_global_mutex_t *smutex; /* mutex */
+ struct ap_slotmem_t *next; /* location of next allocated segment */
+};
+
/* The description of the slots to reuse the slotmem */
struct sharedslotdesc {
@@ -473,7 +485,7 @@
static void ap_sharedmem_register_hook(apr_pool_t *p)
{
const ap_slotmem_storage_method *storage = sharedmem_getstorage();
- ap_register_provider(p, SLOTMEM_STORAGE, "shared", "0", storage);
+ ap_register_provider(p, AP_SLOTMEM_STORAGE, "shared", "0", storage);
ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_LAST);
ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE);
Modified: httpd/httpd/trunk/server/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/Makefile.in?rev=730597&r1=730596&r2=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/server/Makefile.in (original)
+++ httpd/httpd/trunk/server/Makefile.in Thu Jan 1 12:17:56 2009
@@ -14,7 +14,7 @@
mpm_common.c util_charset.c util_cookies.c util_debug.c util_xml.c \
util_expr.c util_filter.c util_pcre.c exports.c \
scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
- eoc_bucket.c eor_bucket.c core_filters.c
+ eoc_bucket.c eor_bucket.c core_filters.c slotmem.c
TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
Copied: httpd/httpd/trunk/server/slotmem.c (from r730595, httpd/httpd/trunk/modules/mem/mod_slotmem.c)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/slotmem.c?p2=httpd/httpd/trunk/server/slotmem.c&p1=httpd/httpd/trunk/modules/mem/mod_slotmem.c&r1=730595&r2=730597&rev=730597&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mem/mod_slotmem.c (original)
+++ httpd/httpd/trunk/server/slotmem.c Thu Jan 1 12:17:56 2009
@@ -19,16 +19,16 @@
* front-end to the actual memory providers.
*/
-#include "mod_slotmem.h"
+#include "ap_slotmem.h"
AP_DECLARE(apr_array_header_t *) ap_slotmem_methods(apr_pool_t *pool)
{
- return (ap_list_provider_names(pool, SLOTMEM_STORAGE, "0"));
+ return (ap_list_provider_names(pool, AP_SLOTMEM_STORAGE, "0"));
}
AP_DECLARE(ap_slotmem_storage_method *) ap_slotmem_method(const char *provider)
{
- return (ap_lookup_provider(SLOTMEM_STORAGE, provider, "0"));
+ return (ap_lookup_provider(AP_SLOTMEM_STORAGE, provider, "0"));
}
AP_DECLARE(apr_status_t) ap_slotmem_do(ap_slotmem_storage_method *sm,
Propchange: httpd/httpd/trunk/server/slotmem.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: httpd/httpd/trunk/server/slotmem.c
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Jan 1 12:17:56 2009
@@ -0,0 +1 @@
+/httpd/httpd/branches/wombat-integration/modules/mem/mod_slotmem.c:723609-723841
|