httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/main mpm_common.c
Date Thu, 22 Jun 2000 16:55:02 GMT
rbb         00/06/22 09:55:02

  Modified:    src/main mpm_common.c
  Log:
  Remove a few unnecessary calls to select.  These calls used to be made so
  that we would sleep for a specified number of microseconds.  APR provides
  a function ap_sleep that does this for us.
  
  Revision  Changes    Path
  1.16      +2 -8      apache-2.0/src/main/mpm_common.c
  
  Index: mpm_common.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/mpm_common.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mpm_common.c	2000/06/22 01:36:33	1.15
  +++ mpm_common.c	2000/06/22 16:55:01	1.16
  @@ -95,7 +95,6 @@
   {
       int i;
       long int waittime = 1024 * 16;      /* in usecs */
  -    struct timeval tv;
       ap_status_t waitret;
       int tries;
       int not_dead_yet;
  @@ -110,10 +109,8 @@
            * necessary, but we need to allow children a few moments to exit.
            * Set delay with an exponential backoff.
            */
  -        tv.tv_sec = waittime / 1000000;
  -        tv.tv_usec = waittime % 1000000;
           waittime = waittime * 4;
  -        ap_select(0, NULL, NULL, NULL, &tv);
  +        ap_sleep(waittime);
   
           /* now see who is done */
           not_dead_yet = 0;
  @@ -203,7 +200,6 @@
   
   void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p)
   {
  -    struct timeval tv;
       ap_status_t rv;
   
       ++wait_or_timeout_counter;
  @@ -226,9 +222,7 @@
           return;
       }
   #endif
  -    tv.tv_sec = SCOREBOARD_MAINTENANCE_INTERVAL / 1000000;
  -    tv.tv_usec = SCOREBOARD_MAINTENANCE_INTERVAL % 1000000;
  -    ap_select(0, NULL, NULL, NULL, &tv);
  +    ap_sleep(SCOREBOARD_MAINTENANCE_INTERVAL);
       ret->pid = -1;
       return;
   }
  
  
  

Mime
View raw message