]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Killed the remains of ALARM_UPDATES_TIME (--enable-time-hack)
authorhno <>
Mon, 29 Jul 2002 03:55:33 +0000 (03:55 +0000)
committerhno <>
Mon, 29 Jul 2002 03:55:33 +0000 (03:55 +0000)
configure.in
src/comm_poll.cc
src/comm_select.cc
src/main.cc

index 6e8d01115a04ff21b9101c8a5fcd07002508f1ea..e28e0adafc703cf281333fa42424dede3ce6da1c 100644 (file)
@@ -3,7 +3,7 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.278 2002/07/15 21:24:48 hno Exp $
+dnl  $Id: configure.in,v 1.279 2002/07/28 21:55:33 hno Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@ AC_INIT(src/main.c)
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 2.6-DEVEL)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.278 $)dnl
+AC_REVISION($Revision: 1.279 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -520,18 +520,6 @@ AC_ARG_ENABLE(snmp,
 AC_SUBST(SNMPLIB)
 AC_SUBST(makesnmplib)
 
-dnl This do not work well.. disable for now so people do not
-dnl enable it and thereby cause problems.. (tired of seeing people
-dnl having enabled this, and then complaining...)
-dnl
-dnl AC_ARG_ENABLE(time-hack,
-dnl [  --enable-time-hack      Update internal timestamp only once per second],
-dnl [ if test "$enableval" = "yes" ; then
-dnl     echo "Update internal timestamp only once per second"
-dnl     AC_DEFINE(ALARM_UPDATES_TIME)
-dnl   fi
-dnl ])
-
 AC_ARG_ENABLE(cachemgr-hostname,
 [  --enable-cachemgr-hostname[=hostname]
                           Make cachemgr.cgi default to this host],
index 0833a1cae282dbc43b5d641de22a8b931db607ec..fe199a0c1aa7f18ed985e7959123e23bf6d63d74 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_poll.cc,v 1.2 2002/04/13 23:07:49 hno Exp $
+ * $Id: comm_poll.cc,v 1.3 2002/07/28 21:55:33 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -226,9 +226,7 @@ comm_check_incoming_poll_handlers(int nfds, int *fds)
     }
     if (!nfds)
        return -1;
-#if !ALARM_UPDATES_TIME
     getCurrentTime();
-#endif
     statCounter.syscalls.polls++;
     if (poll(pfds, npfds, 0) < 1)
        return incoming_sockets_accepted;
@@ -328,11 +326,9 @@ comm_select(int msec)
     static time_t last_timeout = 0;
     double timeout = current_dtime + (msec / 1000.0);
     do {
-#if !ALARM_UPDATES_TIME
        double start;
        getCurrentTime();
        start = current_dtime;
-#endif
        /* Handle any fs callbacks that need doing */
        storeDirCallback();
 #if DELAY_POOLS
@@ -518,10 +514,8 @@ comm_select(int msec)
            }
        }
 #endif
-#if !ALARM_UPDATES_TIME
        getCurrentTime();
        statCounter.select_time += (current_dtime - start);
-#endif
        return COMM_OK;
     }
     while (timeout > current_dtime);
index 07488d06cc5582173235297c8f8b2e50b8154a21..800c54031531111d022b6ae8245a3eec23aa9250 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select.cc,v 1.56 2002/04/27 08:47:43 hno Exp $
+ * $Id: comm_select.cc,v 1.57 2002/07/28 21:55:33 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -231,9 +231,7 @@ comm_check_incoming_select_handlers(int nfds, int *fds)
     }
     if (maxfd++ == 0)
        return -1;
-#if !ALARM_UPDATES_TIME
     getCurrentTime();
-#endif
     statCounter.syscalls.selects++;
     if (select(maxfd, &read_mask, &write_mask, NULL, &zero_tv) < 1)
        return incoming_sockets_accepted;
@@ -346,9 +344,7 @@ comm_select(int msec)
     double timeout = current_dtime + (msec / 1000.0);
     fde *F;
     do {
-#if !ALARM_UPDATES_TIME
        getCurrentTime();
-#endif
 #if DELAY_POOLS
        FD_ZERO(&slowfds);
 #endif
index 7e84d513df4ea5538c1a0a01eff210b0309a504a..fa284d62bb909863a181ee8a2b16df5b691a156d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.352 2002/07/14 17:19:06 hno Exp $
+ * $Id: main.cc,v 1.353 2002/07/28 21:55:33 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -54,9 +54,6 @@ static void mainRotate(void);
 static void mainReconfigure(void);
 static SIGHDLR rotate_logs;
 static SIGHDLR reconfigure;
-#if ALARM_UPDATES_TIME
-static SIGHDLR time_tick;
-#endif
 static void mainInitialize(void);
 static void usage(void);
 static void mainParseOptions(int, char **);
@@ -242,19 +239,6 @@ rotate_logs(int sig)
 #endif
 }
 
-#if ALARM_UPDATES_TIME
-static void
-time_tick(int sig)
-{
-    getCurrentTime();
-    alarm(1);
-#if !HAVE_SIGACTION
-    signal(sig, time_tick);
-#endif
-}
-
-#endif
-
 /* ARGSUSED */
 static void
 reconfigure(int sig)
@@ -554,10 +538,6 @@ mainInitialize(void)
     squid_signal(SIGHUP, reconfigure, SA_RESTART);
     squid_signal(SIGTERM, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
     squid_signal(SIGINT, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
-#if ALARM_UPDATES_TIME
-    squid_signal(SIGALRM, time_tick, SA_RESTART);
-    alarm(1);
-#endif
     memCheckInit();
     debug(1, 1) ("Ready to serve requests.\n");
     if (!configured_once) {