httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: httpd-2.0/server scoreboard.c
Date Sun, 30 Dec 2001 13:27:48 GMT
bjh         01/12/30 05:27:48

  Modified:    include  scoreboard.h
               server   scoreboard.c
  Log:
  Make calc_scoreboard_size() and init_scoreboard() usable from MPMs.
  
  Revision  Changes    Path
  1.36      +2 -0      httpd-2.0/include/scoreboard.h
  
  Index: scoreboard.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/scoreboard.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- scoreboard.h	29 Dec 2001 19:55:46 -0000	1.35
  +++ scoreboard.h	30 Dec 2001 13:27:48 -0000	1.36
  @@ -199,6 +199,8 @@
   AP_DECLARE_NONSTD(void) ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t);
   AP_DECLARE(void) ap_increment_counts(void *sbh, request_rec *r);
   
  +int ap_calc_scoreboard_size(void);
  +void ap_init_scoreboard(void);
   apr_status_t ap_cleanup_scoreboard(void *d);
   
   AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p);
  
  
  
  1.44      +5 -4      httpd-2.0/server/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- scoreboard.c	24 Dec 2001 21:00:18 -0000	1.43
  +++ scoreboard.c	30 Dec 2001 13:27:48 -0000	1.44
  @@ -123,7 +123,7 @@
       return APR_SUCCESS;
   }
   
  -static void calc_scoreboard_size(void)
  +int ap_calc_scoreboard_size(void)
   {
       ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
       ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
  @@ -131,9 +131,10 @@
       scoreboard_size += sizeof(process_score) * server_limit;
       scoreboard_size += sizeof(worker_score * ) * server_limit;
       scoreboard_size += sizeof(worker_score) * server_limit * thread_limit;
  +    return scoreboard_size;
   }
   
  -static void init_scoreboard(void)
  +void ap_init_scoreboard(void)
   {
       char *more_storage;
       int i;
  @@ -216,7 +217,7 @@
       if (ap_scoreboard_image)
   	running_gen = ap_scoreboard_image->global.running_generation;
       if (ap_scoreboard_image == NULL) {
  -        calc_scoreboard_size();
  +        ap_calc_scoreboard_size();
           if (sb_type == SB_SHARED) {
               rv = setup_shared(p);
               if (rv) {
  @@ -234,7 +235,7 @@
               }
           }
       }
  -    init_scoreboard(); /* can't just memset() */
  +    ap_init_scoreboard(); /* can't just memset() */
       ap_scoreboard_image->global.sb_type = sb_type;
       ap_scoreboard_image->global.running_generation = running_gen;
       ap_restart_time = apr_time_now();
  
  
  

Mime
View raw message