--------------------- PatchSet 1555 Date: 2005/08/21 07:43:52 Author: serassio Branch: nt Tag: (none) Log: Runned Astyle Members: src/ipc.cc:1.8.2.18->1.8.2.19 src/DiskIO/WinDiskThreads/WinDiskThreadsIOStrategy.cc:1.1.2.3->1.1.2.4 src/DiskIO/WinDiskThreads/aiops.cc:1.1.2.4->1.1.2.5 src/DiskIO/WinDiskThreads/async_io.cc:1.1.2.2->1.1.2.3 Index: squid3/src/ipc.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ipc.cc,v retrieving revision 1.8.2.18 retrieving revision 1.8.2.19 diff -u -r1.8.2.18 -r1.8.2.19 --- squid3/src/ipc.cc 21 Aug 2005 07:20:28 -0000 1.8.2.18 +++ squid3/src/ipc.cc 21 Aug 2005 07:43:52 -0000 1.8.2.19 @@ -1,6 +1,6 @@ /* - * $Id: ipc.cc,v 1.8.2.18 2005/08/21 07:20:28 serassio Exp $ + * $Id: ipc.cc,v 1.8.2.19 2005/08/21 07:43:52 serassio Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels @@ -1395,22 +1395,29 @@ fd_table[result->childFD.rfd].flags.ipc = 1; fd_table[result->childFD.wfd].flags.ipc = 1; - if (Config.sleep_after_fork) { + + if (Config.sleep_after_fork) + { /* XXX emulation of usleep() */ DWORD sl; sl = Config.sleep_after_fork / 1000; + if (sl == 0) - sl = 1; + sl = 1; + Sleep(sl); } + DWORD ecode = 0; - if (GetExitCodeThread(result->mySpawn->getHandle(), &ecode) && ecode == STILL_ACTIVE) { + if (GetExitCodeThread(result->mySpawn->getHandle(), &ecode) && ecode == STILL_ACTIVE) + { result->result (IPCResult(true, pid, result->prfd, result->pwfd, HProcess)); debugs(50, 1, "IPC::Create: Program: " << prog << ", PID: " << ", Handle: 0x" << HProcess); return result; - } else { + } else + { result->cleanUp(); return result; } Index: squid3/src/DiskIO/WinDiskThreads/WinDiskThreadsIOStrategy.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DiskIO/WinDiskThreads/Attic/WinDiskThreadsIOStrategy.cc,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid3/src/DiskIO/WinDiskThreads/WinDiskThreadsIOStrategy.cc 21 Aug 2005 07:38:48 -0000 1.1.2.3 +++ squid3/src/DiskIO/WinDiskThreads/WinDiskThreadsIOStrategy.cc 21 Aug 2005 07:43:52 -0000 1.1.2.4 @@ -1,6 +1,6 @@ /* - * $Id: WinDiskThreadsIOStrategy.cc,v 1.1.2.3 2005/08/21 07:38:48 serassio Exp $ + * $Id: WinDiskThreadsIOStrategy.cc,v 1.1.2.4 2005/08/21 07:43:52 serassio Exp $ * * DEBUG: section 79 Squid-side Disk I/O functions. * AUTHOR: Robert Collins @@ -113,6 +113,7 @@ break; case _AIO_OP_TRUNCATE: + case _AIO_OP_UNLINK: ++squidaio_counts.unlink_finish; break; Index: squid3/src/DiskIO/WinDiskThreads/aiops.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DiskIO/WinDiskThreads/Attic/aiops.cc,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- squid3/src/DiskIO/WinDiskThreads/aiops.cc 21 Aug 2005 07:38:48 -0000 1.1.2.4 +++ squid3/src/DiskIO/WinDiskThreads/aiops.cc 21 Aug 2005 07:43:52 -0000 1.1.2.5 @@ -1,5 +1,5 @@ /* - * $Id: aiops.cc,v 1.1.2.4 2005/08/21 07:38:48 serassio Exp $ + * $Id: aiops.cc,v 1.1.2.5 2005/08/21 07:43:52 serassio Exp $ * * DEBUG: section 43 AIOPS * AUTHOR: Stewart Forster @@ -311,9 +311,9 @@ done_queue.requests = 0; done_queue.blocked = 0; - + CommIO::NotifyIOCompleted(); - + /* Create threads and get them to sit in their wait loop */ squidaio_thread_pool = new MemAllocatorProxy("aio_thread", sizeof(squidaio_thread_t)); @@ -404,7 +404,7 @@ squidaio_thread_t *threadp = (squidaio_thread_t *)lpParam; squidaio_request_t *request; HANDLE cond; /* local copy of the event queue because win32 event handles - * don't atomically release the mutex as cond variables do. */ + * don't atomically release the mutex as cond variables do. */ /* lock the thread info */ @@ -516,6 +516,7 @@ break; #if USE_TRUNCATE + case _AIO_OP_TRUNCATE: squidaio_do_truncate(request); break; @@ -1022,6 +1023,7 @@ requestp->ret = truncate(requestp->path, requestp->offset); requestp->err = errno; } + #else @@ -1057,6 +1059,7 @@ requestp->ret = unlink(requestp->path); requestp->err = errno; } + #endif Index: squid3/src/DiskIO/WinDiskThreads/async_io.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/DiskIO/WinDiskThreads/Attic/async_io.cc,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/src/DiskIO/WinDiskThreads/async_io.cc 21 Aug 2005 07:38:48 -0000 1.1.2.2 +++ squid3/src/DiskIO/WinDiskThreads/async_io.cc 21 Aug 2005 07:43:52 -0000 1.1.2.3 @@ -1,6 +1,6 @@ /* - * $Id: async_io.cc,v 1.1.2.2 2005/08/21 07:38:48 serassio Exp $ + * $Id: async_io.cc,v 1.1.2.3 2005/08/21 07:43:52 serassio Exp $ * * DEBUG: section 32 Asynchronous Disk I/O * AUTHOR: Pete Bentley @@ -226,6 +226,7 @@ squidaio_truncate(path, length, &ctrlp->result); dlinkAdd(ctrlp, &ctrlp->node, &used_list); } /* aioTruncate */ + #else void @@ -243,6 +244,7 @@ squidaio_unlink(path, &ctrlp->result); dlinkAdd(ctrlp, &ctrlp->node, &used_list); } /* aioUnlink */ + #endif int