From 606bd3b593e21a572083912a0d0623fc4b2a2124 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Wed, 4 Jun 1997 11:50:26 +0000 Subject: [PATCH] USE_ASYNC_IO cleanup --- src/Makefile.in | 4 +++- src/disk.cc | 15 +++++++++------ src/store.cc | 4 +++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index ce16dae666..2caf9a86b9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.73 1997/06/01 04:23:08 wessels Exp $ +# $Id: Makefile.in,v 1.74 1997/06/04 05:50:26 wessels Exp $ # # Uncomment and customize the following to suit your needs: # @@ -75,6 +75,8 @@ SUID_UTILS = pinger CGIPROGS = cachemgr.cgi OBJS = \ acl.o \ + aiops.o \ + async_io.o \ cache_cf.o \ client_db.o \ client_side.o \ diff --git a/src/disk.cc b/src/disk.cc index 6c7b2b9d32..02f22bba6a 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -1,5 +1,5 @@ /* - * $Id: disk.cc,v 1.71 1997/06/02 19:56:01 wessels Exp $ + * $Id: disk.cc,v 1.72 1997/06/04 05:50:27 wessels Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -394,9 +394,10 @@ static void diskHandleRead(int fd, void *data) { dread_ctrl *ctrl_dat = data; +#if !USE_ASYNC_IO int len; - disk_ctrl_t *ctrlp; - ctrlp = xcalloc(1, sizeof(disk_ctrl_t)); +#endif + disk_ctrl_t *ctrlp = xcalloc(1, sizeof(disk_ctrl_t)); ctrlp->fd = fd; ctrlp->data = ctrl_dat; #if USE_ASYNC_IO @@ -512,13 +513,15 @@ static void diskHandleWalk(int fd, void *data) { dwalk_ctrl *walk_dat = data; +#if !USE_ASYNC_IO int len; - disk_ctrl_t *ctrlp; - ctrlp = xcalloc(1, sizeof(disk_ctrl_t)); +#endif + disk_ctrl_t *ctrlp = xcalloc(1, sizeof(disk_ctrl_t)); ctrlp->fd = fd; ctrlp->data = walk_dat; #if USE_ASYNC_IO - aioRead(fd, walk_dat->buf, + aioRead(fd, + walk_dat->buf, DISK_LINE_LEN - 1, diskHandleWalkComplete, ctrlp); diff --git a/src/store.cc b/src/store.cc index 8bbf20d1e9..7b2cb46716 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.250 1997/06/03 20:09:45 wessels Exp $ + * $Id: store.cc,v 1.251 1997/06/04 05:50:29 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -1495,7 +1495,9 @@ storeValidate(StoreEntry * e, VCB callback, void *callback_data) valid_ctrl_t *ctrlp; char *path; struct stat *sb; +#if !USE_ASYNC_IO int x; +#endif assert(!BIT_TEST(e->flag, ENTRY_VALIDATED)); if (e->swap_file_number < 0) { BIT_RESET(e->flag, ENTRY_VALIDATED); -- 2.47.2