]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
get ASYNC_IO stuff really working
authorwessels <>
Tue, 16 Jul 1996 05:48:27 +0000 (05:48 +0000)
committerwessels <>
Tue, 16 Jul 1996 05:48:27 +0000 (05:48 +0000)
src/Makefile.in
src/disk.cc
src/main.cc
src/squid.h
src/tools.cc

index 39edff3c80aa975be5625524bde7808d50811a1c..4d25ae257ed490b212d7361e5f653ef6bff7fe25 100644 (file)
@@ -1,12 +1,14 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.28 1996/07/11 17:42:34 wessels Exp $
+#  $Id: Makefile.in,v 1.29 1996/07/15 23:48:27 wessels Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
 HOST_OPT       = # -DCACHEMGR_HOSTNAME="getfullhostname()"
-DEFINES         = $(HOST_OPT)
+AIO_OPT                = # -DUSE_ASYNC_IO=1
+AIO_LIB                = # -labi
+DEFINES         = $(HOST_OPT) $(AIO_OPT)
 
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
@@ -37,7 +39,7 @@ PERL            = @PERL@
 CRYPT_LIB      = @CRYPT_LIB@
 AC_CFLAGS      = @CFLAGS@
 LDFLAGS                = @LDFLAGS@
-XTRA_LIBS      = @XTRA_LIBS@
+XTRA_LIBS      = @XTRA_LIBS@ $(AIO_LIB)
 XTRA_OBJS      = @XTRA_OBJS@
 MV             = @MV@
 RM             = @RM@
index 5e76febb3d20cfc45330930be741e60338d44a94..8395b7d375a7c351beb557cf851a1c470dc5426d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: disk.cc,v 1.17 1996/07/09 23:01:16 wessels Exp $
+ * $Id: disk.cc,v 1.18 1996/07/15 23:48:32 wessels Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -436,7 +436,7 @@ int file_write(fd, ptr_to_buf, len, access_code, handle, handle_data)
     /* got to start write routine for this fd */
 #if USE_ASYNC_IO
     return aioFileQueueWrite(fd,
-       file_aio_write_complete,
+       aioFileWriteComplete,
        &file_table[fd]);
 #else
     comm_set_select_handler(fd,
@@ -532,7 +532,7 @@ int file_read(fd, buf, req_len, offset, handler, client_data)
     ctrl_dat->client_data = client_data;
 
 #if USE_ASYNC_IO
-    return aioFileQueueRead(fd, file_aio_read_complete, ctrl_dat);
+    return aioFileQueueRead(fd, aioFileReadComplete, ctrl_dat);
 #else
     comm_set_select_handler(fd,
        COMM_SELECT_READ,
index 2aca9ccc1296e3d512fdd48b61e0cd445350c879..cc216fb2e33122a1c84dbcc7a179e1f98edec8fe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.50 1996/07/14 05:35:54 wessels Exp $
+ * $Id: main.cc,v 1.51 1996/07/15 23:48:34 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -390,6 +390,8 @@ static void mainInitialize()
     squid_signal(SIGPIPE, SIG_IGN, SA_RESTART);
     squid_signal(SIGCHLD, sig_child, SA_NODEFER | SA_RESTART);
 #if USE_ASYNC_IO
+    if (first_time)
+       aio_init();
     squid_signal(SIGIO, aioSigHandler, SA_RESTART);
 #endif
 
@@ -414,6 +416,7 @@ static void mainInitialize()
     debug(1, 1, "With %d file descriptors available\n", FD_SETSIZE);
 
     if (first_time) {
+       stmemInit();            /* stmem must go before at least redirect */
        disk_init();            /* disk_init must go before ipcache_init() */
        writePidFile();         /* write PID file */
     }
@@ -432,7 +435,6 @@ static void mainInitialize()
        urlInitialize();
        stat_init(&CacheInfo, getAccessLogFile());
        storeInit();
-       stmemInit();
 
        if (getEffectiveUser()) {
            /* we were probably started as root, so cd to a swap
index 0c67f7f61307516452253dbec7c8955f2c1bd238..4449658ace70654b29423fde5039da5224226819 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.26 1996/07/11 17:42:53 wessels Exp $
+ * $Id: squid.h,v 1.27 1996/07/15 23:48:36 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -230,6 +230,7 @@ typedef void (*SIH) _PARAMS((int, void *)); /* swap in */
 #include "acl.h"
 #include "util.h"
 #include "background.h"
+#include "async_io.h"
 #include "redirect.h"
 
 #if !HAVE_TEMPNAM
index 9656af14e2f7edbe3c102469e93646a0bac60cd4..94939d5ecb62c817865b33afd1ef06d1f4c097ad 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: tools.cc,v 1.43 1996/07/09 03:41:45 wessels Exp $
+ * $Id: tools.cc,v 1.44 1996/07/15 23:48:38 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -527,7 +528,7 @@ void setMaxFD()
 
 time_t getCurrentTime()
 {
-#if defined(_SQUID_MOTOROLA_)
+#if GETTIMEOFDAY_NO_TZP
     gettimeofday(&current_time);
 #else
     gettimeofday(&current_time, NULL);