httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Wed, 18 Jul 2001 20:45:36 GMT
rbb         01/07/18 13:45:36

  Modified:    .        CHANGES
               include  scoreboard.h
               server   core.c scoreboard.c
               server/mpm/beos beos.c
               server/mpm/perchild perchild.c
               server/mpm/prefork prefork.c
               server/mpm/spmt_os2 spmt_os2.c
               server/mpm/threaded threaded.c
               server/mpm/winnt mpm_winnt.c
  Log:
  Make scoreboard creation a hook.  This allows management
  modules to have access to the scoreboard at the time that it is
  created, and at every restart request.
  Submitted by:	Cody Sherr <csherr@covalent.net>
  Reviewed by:	Ryan Bloom
  
  Revision  Changes    Path
  1.249     +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.248
  retrieving revision 1.249
  diff -u -r1.248 -r1.249
  --- CHANGES	2001/07/18 20:28:58	1.248
  +++ CHANGES	2001/07/18 20:45:35	1.249
  @@ -1,5 +1,10 @@
   Changes with Apache 2.0.21-dev
   
  +  *) Make scoreboard creation a hook.  This allows management
  +     modules to have access to the scoreboard at the time that it is
  +     created, and at every restart request.  
  +     [Cody Sherr <csherr@covalent.net>]
  +
     *) Changed AP_MPMQ_MAX_DAEMONS to refer to MaxClients and
        added an AP_MPMQ_MAX_DAEMON_USED to refer to the highest
        daemon index actually used in the scoreboard. I also
  
  
  
  1.26      +11 -0     httpd-2.0/include/scoreboard.h
  
  Index: scoreboard.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/scoreboard.h,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- scoreboard.h	2001/07/16 02:29:33	1.25
  +++ scoreboard.h	2001/07/18 20:45:35	1.26
  @@ -69,7 +69,9 @@
   #include <time.h>
   #endif
   
  +#include "ap_config.h"
   #include "mpm_default.h"	/* For HARD_.*_LIMIT */
  +#include "apr_hooks.h"
   #include "apr_thread_proc.h"
   #include "apr_portable.h"
   
  @@ -220,6 +222,15 @@
   AP_DECLARE_DATA extern apr_time_t ap_restart_time;
   
   AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation;
  +
  +/* Hooks */
  +/**
  +  * Hook for post scoreboard creation, pre mpm.
  +  * @param p       Apache pool to allocate from.
  +  * @param sb_type 
  +  * @ingroup hooks
  +  */  
  +AP_DECLARE_HOOK(void, pre_mpm, (apr_pool_t *p, ap_scoreboard_e sb_type))
   
   /* for time_process_request() in http_main.c */
   #define START_PREQUEST 1
  
  
  
  1.26      +1 -0      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- core.c	2001/07/06 18:41:56	1.25
  +++ core.c	2001/07/18 20:45:35	1.26
  @@ -3319,6 +3319,7 @@
       ap_hook_type_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
       ap_hook_access_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
       ap_hook_create_request(core_create_req, NULL, NULL, APR_HOOK_MIDDLE);
  +    ap_hook_pre_mpm(ap_create_scoreboard, NULL, NULL, APR_HOOK_MIDDLE);
   
       /* register the core's insert_filter hook and register core-provided
        * filters
  
  
  
  1.29      +9 -0      httpd-2.0/server/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- scoreboard.c	2001/07/18 20:28:59	1.28
  +++ scoreboard.c	2001/07/18 20:45:35	1.29
  @@ -88,6 +88,15 @@
   #include "apr_shmem.h"
   static apr_shmem_t *scoreboard_shm = NULL;
   #endif
  +
  +APR_HOOK_STRUCT(
  +    APR_HOOK_LINK(pre_mpm)
  +)
  + 
  +AP_IMPLEMENT_HOOK_VOID(pre_mpm,
  +                       (apr_pool_t *p, ap_scoreboard_e sb_type),
  +                       (p, sb_type))
  +
   /*
    * ToDo:
    * This function should be renamed to cleanup_shared
  
  
  
  1.55      +1 -1      httpd-2.0/server/mpm/beos/beos.c
  
  Index: beos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- beos.c	2001/07/18 20:28:59	1.54
  +++ beos.c	2001/07/18 20:45:35	1.55
  @@ -767,7 +767,7 @@
        */
       
       if (!is_graceful)
  -        ap_create_scoreboard(pconf, SB_SHARED);
  +        ap_run_pre_mpm(pconf, SB_SHARED);
   
       if (!is_graceful) {
           for (i = 0; i < HARD_SERVER_LIMIT; i++) {
  
  
  
  1.71      +1 -1      httpd-2.0/server/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- perchild.c	2001/07/18 20:28:59	1.70
  +++ perchild.c	2001/07/18 20:45:35	1.71
  @@ -1211,7 +1211,7 @@
       }
   
       if (!is_graceful) {
  -        ap_create_scoreboard(pconf, SB_SHARED);
  +        ap_run_pre_mpm(pconf, SB_SHARED);
       }
       /* Initialize the child table */
       if (!is_graceful) {
  
  
  
  1.192     +1 -1      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.191
  retrieving revision 1.192
  diff -u -r1.191 -r1.192
  --- prefork.c	2001/07/18 20:28:59	1.191
  +++ prefork.c	2001/07/18 20:45:35	1.192
  @@ -1109,7 +1109,7 @@
   
       SAFE_ACCEPT(accept_mutex_init(pconf));
       if (!is_graceful) {
  -        ap_create_scoreboard(pconf, SB_SHARED);
  +        ap_run_pre_mpm(pconf, SB_SHARED);
       }
   #ifdef SCOREBOARD_FILE
       else {
  
  
  
  1.98      +1 -1      httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- spmt_os2.c	2001/07/18 20:28:59	1.97
  +++ spmt_os2.c	2001/07/18 20:45:36	1.98
  @@ -941,7 +941,7 @@
       SAFE_ACCEPT(accept_mutex_init(pconf));
   
       if (!is_graceful) {
  -        ap_create_scoreboard(pconf, SB_NOT_SHARED);
  +        ap_run_pre_mpm(pconf, SB_NOT_SHARED);
           memset(thread_control, 0, sizeof(thread_control));
       }
   
  
  
  
  1.46      +1 -1      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- threaded.c	2001/07/18 20:28:59	1.45
  +++ threaded.c	2001/07/18 20:45:36	1.46
  @@ -1168,7 +1168,7 @@
       }
   
       if (!is_graceful) {
  -        ap_create_scoreboard(pconf, SB_SHARED);
  +        ap_run_pre_mpm(pconf, SB_SHARED);
       }
   
       set_signals();
  
  
  
  1.166     +1 -1      httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- mpm_winnt.c	2001/07/18 20:29:00	1.165
  +++ mpm_winnt.c	2001/07/18 20:45:36	1.166
  @@ -1981,7 +1981,7 @@
                        "Child %d: Child process is running", my_pid);
   
           /* Set up the scoreboard. */
  -        ap_create_scoreboard(pconf, SB_NOT_SHARED);
  +        ap_run_pre_mpm(pconf, SB_NOT_SHARED);
           if (one_process) {
               if (ap_setup_listeners(server_conf) < 1) {
                   return 1;
  
  
  

Mime
View raw message