From 7a3db604ec2ef0d30b3777400784a7eda666cc27 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 11:35:11 +0100 Subject: [PATCH 01/15] Move async code to async/libasync.la --- configure.ac | 1 + src/EventLoop.cc | 2 +- src/Makefile.am | 7 +++---- src/adaptation/ecap/ServiceRep.cc | 2 +- src/{ => async}/AsyncEngine.cc | 3 +-- src/{ => async}/AsyncEngine.h | 0 src/async/Makefile.am | 14 ++++++++++++++ src/event.h | 2 +- src/tests/testEventLoop.cc | 2 +- 9 files changed, 23 insertions(+), 10 deletions(-) rename src/{ => async}/AsyncEngine.cc (90%) rename src/{ => async}/AsyncEngine.h (100%) create mode 100644 src/async/Makefile.am diff --git a/configure.ac b/configure.ac index 57c5cdafc6f..bff6f54c30e 100644 --- a/configure.ac +++ b/configure.ac @@ -2993,6 +2993,7 @@ AC_CONFIG_FILES([ src/adaptation/icap/Makefile src/adaptation/ecap/Makefile src/anyp/Makefile + src/async/Makefile src/auth/Makefile src/auth/basic/Makefile src/auth/basic/DB/Makefile diff --git a/src/EventLoop.cc b/src/EventLoop.cc index 00920c732dd..ac81d818a2d 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -9,7 +9,7 @@ /* DEBUG: section 01 Main Loop */ #include "squid.h" -#include "AsyncEngine.h" +#include "async/AsyncEngine.h" #include "base/AsyncCallQueue.h" #include "debug/Stream.h" #include "EventLoop.h" diff --git a/src/Makefile.am b/src/Makefile.am index 8921c4f1430..8332dce4d81 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,7 @@ LOADABLE_MODULES_SOURCES = \ LoadableModules.cc \ LoadableModules.h -SUBDIRS = mem time debug base anyp helper dns html ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp +SUBDIRS = async mem time debug base anyp helper dns html ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp if ENABLE_AUTH SUBDIRS += auth @@ -24,7 +24,7 @@ AUTH_LIBS= auth/libauth.la AUTH_ACL_LIBS= auth/libacls.la endif -SUBDIRS += http ip icmp ident log ipc mgr +SUBDIRS += http ip icmp ident log ipc mgr SSL_LIBS= if ENABLE_SSL @@ -195,8 +195,6 @@ squid_SOURCES = \ $(WINSVC_SOURCE) \ AccessLogEntry.cc \ AccessLogEntry.h \ - AsyncEngine.cc \ - AsyncEngine.h \ AuthReg.h \ BodyPipe.cc \ BodyPipe.h \ @@ -490,6 +488,7 @@ squid_LDADD = \ helper/libhelper.la \ http/libhttp.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ libsquid.la \ ip/libip.la \ diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index dac4a1f92d7..e0443d8b316 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -13,7 +13,7 @@ #include "adaptation/ecap/Host.h" #include "adaptation/ecap/ServiceRep.h" #include "adaptation/ecap/XactionRep.h" -#include "AsyncEngine.h" +#include "async/AsyncEngine.h" #include "base/TextException.h" #include "debug/Stream.h" #include "EventLoop.h" diff --git a/src/AsyncEngine.cc b/src/async/AsyncEngine.cc similarity index 90% rename from src/AsyncEngine.cc rename to src/async/AsyncEngine.cc index 2b934472e35..40177207e14 100644 --- a/src/AsyncEngine.cc +++ b/src/async/AsyncEngine.cc @@ -7,5 +7,4 @@ */ #include "squid.h" -#include "AsyncEngine.h" - +#include "async/AsyncEngine.h" diff --git a/src/AsyncEngine.h b/src/async/AsyncEngine.h similarity index 100% rename from src/AsyncEngine.h rename to src/async/AsyncEngine.h diff --git a/src/async/Makefile.am b/src/async/Makefile.am new file mode 100644 index 00000000000..e8a42a183a6 --- /dev/null +++ b/src/async/Makefile.am @@ -0,0 +1,14 @@ +## Copyright (C) 1996-2023 The Squid Software Foundation and contributors +## +## Squid software is distributed under GPLv2+ license and includes +## contributions from numerous individuals and organizations. +## Please see the COPYING and CONTRIBUTORS files for details. +## + +include $(top_srcdir)/src/Common.am + +noinst_LTLIBRARIES = libasync.la + +libasync_la_SOURCES = \ + AsyncEngine.cc \ + AsyncEngine.h \ No newline at end of file diff --git a/src/event.h b/src/event.h index d93e5fbee15..e6a9060e809 100644 --- a/src/event.h +++ b/src/event.h @@ -9,7 +9,7 @@ #ifndef SQUID_EVENT_H #define SQUID_EVENT_H -#include "AsyncEngine.h" +#include "async/AsyncEngine.h" #include "base/Packable.h" #include "mem/forward.h" diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index 65ea78f9e91..2286dc951bb 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "AsyncEngine.h" +#include "async/AsyncEngine.h" #include "compat/cppunit.h" #include "EventLoop.h" #include "time/Engine.h" From 965804c7ce78541a675b1e4276e297c19321f096 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 11:47:49 +0100 Subject: [PATCH 02/15] Move many Async files from base/ to async/ --- src/BodyPipe.cc | 2 +- src/BodyPipe.h | 2 +- src/CollapsedForwarding.cc | 2 +- src/CommCalls.h | 4 ++-- src/DelayVector.cc | 2 +- src/DiskIO/IpcIo/IpcIoFile.cc | 2 +- src/DiskIO/IpcIo/IpcIoFile.h | 2 +- src/Downloader.h | 4 ++-- src/EventLoop.cc | 2 +- src/FwdState.cc | 4 ++-- src/HappyConnOpener.cc | 2 +- src/HappyConnOpener.h | 2 +- src/HttpControlMsg.h | 2 +- src/PeerPoolMgr.cc | 2 +- src/PeerPoolMgr.h | 2 +- src/StoreClient.h | 2 +- src/adaptation/AccessCheck.cc | 2 +- src/adaptation/AccessCheck.h | 2 +- src/adaptation/Answer.cc | 2 +- src/adaptation/Config.h | 2 +- src/adaptation/Initiate.cc | 2 +- src/adaptation/Initiate.h | 2 +- src/adaptation/Initiator.cc | 2 +- src/adaptation/Initiator.h | 2 +- src/adaptation/ecap/XactionRep.cc | 2 +- src/adaptation/icap/Config.h | 2 +- src/adaptation/icap/ServiceRep.h | 2 +- src/adaptation/icap/Xaction.cc | 2 +- src/{base => async}/AsyncCall.cc | 4 ++-- src/{base => async}/AsyncCall.h | 2 +- src/{base => async}/AsyncCallList.cc | 4 ++-- src/{base => async}/AsyncCallList.h | 2 +- src/{base => async}/AsyncCallQueue.cc | 4 ++-- src/{base => async}/AsyncCallQueue.h | 2 +- src/{base => async}/AsyncCallbacks.h | 4 ++-- src/{base => async}/AsyncCalls.dox | 0 src/{base => async}/AsyncCbdataCalls.h | 2 +- src/{base => async}/AsyncFunCalls.h | 2 +- src/{base => async}/AsyncJob.cc | 6 +++--- src/{base => async}/AsyncJob.h | 2 +- src/{base => async}/AsyncJobCalls.h | 2 +- src/{base => async}/AsyncJobs.dox | 0 src/async/Makefile.am | 14 +++++++++++++- src/base/DelayedAsyncCalls.cc | 2 +- src/base/DelayedAsyncCalls.h | 2 +- src/base/JobWait.cc | 2 +- src/base/JobWait.h | 2 +- src/base/Makefile.am | 12 ------------ src/base/Subscription.h | 2 +- src/client_side.cc | 2 +- src/client_side_request.cc | 2 +- src/clients/Client.cc | 2 +- src/clients/Client.h | 2 +- src/clients/FtpClient.cc | 2 +- src/clients/FtpRelay.cc | 2 +- src/clients/HttpTunneler.h | 4 ++-- src/comm.cc | 2 +- src/comm/ConnOpener.h | 4 ++-- src/comm/IoCallback.h | 2 +- src/comm/Read.h | 2 +- src/comm/TcpAcceptor.h | 2 +- src/comm/Write.h | 2 +- src/fs/rock/RockHeaderUpdater.cc | 2 +- src/fs/rock/RockHeaderUpdater.h | 2 +- src/fs/rock/RockRebuild.cc | 2 +- src/fs/rock/RockRebuild.h | 2 +- src/helper.cc | 2 +- src/helper.h | 2 +- src/htcp.cc | 2 +- src/http.cc | 2 +- src/icp_v2.cc | 2 +- src/ipc/Forwarder.cc | 2 +- src/ipc/Forwarder.h | 2 +- src/ipc/Inquirer.h | 4 ++-- src/ipc/SharedListen.cc | 2 +- src/ipc/SharedListen.h | 2 +- src/ipc/StartListening.cc | 2 +- src/ipc/StartListening.h | 2 +- src/ipc/UdsOp.h | 2 +- src/log/TcpLogger.h | 2 +- src/mgr/Forwarder.cc | 2 +- src/mgr/StoreToCommWriter.cc | 2 +- src/mgr/StoreToCommWriter.h | 2 +- src/peer_select.cc | 2 +- src/security/PeerConnector.cc | 2 +- src/security/PeerConnector.h | 4 ++-- src/servers/Server.h | 2 +- src/snmp_core.cc | 2 +- src/ssl/ServerBump.h | 2 +- src/ssl/helper.cc | 2 +- src/ssl/helper.h | 2 +- src/store.cc | 2 +- src/store_client.cc | 2 +- src/tests/stub_libcomm.cc | 2 +- src/tests/testEvent.cc | 2 +- src/tunnel.cc | 2 +- 96 files changed, 118 insertions(+), 118 deletions(-) rename src/{base => async}/AsyncCall.cc (97%) rename src/{base => async}/AsyncCall.h (99%) rename src/{base => async}/AsyncCallList.cc (94%) rename src/{base => async}/AsyncCallList.h (97%) rename src/{base => async}/AsyncCallQueue.cc (94%) rename src/{base => async}/AsyncCallQueue.h (96%) rename src/{base => async}/AsyncCallbacks.h (99%) rename src/{base => async}/AsyncCalls.dox (100%) rename src/{base => async}/AsyncCbdataCalls.h (97%) rename src/{base => async}/AsyncFunCalls.h (98%) rename src/{base => async}/AsyncJob.cc (98%) rename src/{base => async}/AsyncJob.h (99%) rename src/{base => async}/AsyncJobCalls.h (99%) rename src/{base => async}/AsyncJobs.dox (100%) diff --git a/src/BodyPipe.cc b/src/BodyPipe.cc index dfdf53ae1c9..47c19fc8c79 100644 --- a/src/BodyPipe.cc +++ b/src/BodyPipe.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/TextException.h" #include "BodyPipe.h" diff --git a/src/BodyPipe.h b/src/BodyPipe.h index 5427d1d918b..66a95b12ca9 100644 --- a/src/BodyPipe.h +++ b/src/BodyPipe.h @@ -9,7 +9,7 @@ #ifndef SQUID_BODY_PIPE_H #define SQUID_BODY_PIPE_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" #include "MemBuf.h" diff --git a/src/CollapsedForwarding.cc b/src/CollapsedForwarding.cc index 62d8a993cfa..0845129bbf2 100644 --- a/src/CollapsedForwarding.cc +++ b/src/CollapsedForwarding.cc @@ -9,7 +9,7 @@ /* DEBUG: section 17 Request Forwarding */ #include "squid.h" -#include "base/AsyncFunCalls.h" +#include "async/AsyncFunCalls.h" #include "CollapsedForwarding.h" #include "globals.h" #include "ipc/mem/Segment.h" diff --git a/src/CommCalls.h b/src/CommCalls.h index a5c422c19fb..7b7a2138d1d 100644 --- a/src/CommCalls.h +++ b/src/CommCalls.h @@ -9,8 +9,8 @@ #ifndef SQUID_COMMCALLS_H #define SQUID_COMMCALLS_H -#include "base/AsyncCall.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncCall.h" +#include "async/AsyncJobCalls.h" #include "comm/Flag.h" #include "comm/forward.h" #include "MasterXaction.h" diff --git a/src/DelayVector.cc b/src/DelayVector.cc index d6681951e69..77696d6337e 100644 --- a/src/DelayVector.cc +++ b/src/DelayVector.cc @@ -11,7 +11,7 @@ #include "squid.h" #if USE_DELAY_POOLS -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/DelayedAsyncCalls.h" #include "comm/Connection.h" #include "DelayVector.h" diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 449a6c97b09..12f3f47ce42 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -9,7 +9,7 @@ /* DEBUG: section 47 Store Directory Routines */ #include "squid.h" -#include "base/AsyncFunCalls.h" +#include "async/AsyncFunCalls.h" #include "base/CodeContext.h" #include "base/RunnersRegistry.h" #include "base/TextException.h" diff --git a/src/DiskIO/IpcIo/IpcIoFile.h b/src/DiskIO/IpcIo/IpcIoFile.h index b01b8ba5ddd..f9246cb7cee 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.h +++ b/src/DiskIO/IpcIo/IpcIoFile.h @@ -9,7 +9,7 @@ #ifndef SQUID_IPC_IOFILE_H #define SQUID_IPC_IOFILE_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "cbdata.h" #include "DiskIO/DiskFile.h" #include "DiskIO/IORequestor.h" diff --git a/src/Downloader.h b/src/Downloader.h index 1698ba24744..652dabd5771 100644 --- a/src/Downloader.h +++ b/src/Downloader.h @@ -9,8 +9,8 @@ #ifndef SQUID_DOWNLOADER_H #define SQUID_DOWNLOADER_H -#include "base/AsyncCallbacks.h" -#include "base/AsyncJob.h" +#include "async/AsyncCallbacks.h" +#include "async/AsyncJob.h" #include "defines.h" #include "http/forward.h" #include "http/StatusCode.h" diff --git a/src/EventLoop.cc b/src/EventLoop.cc index ac81d818a2d..d72a8ef0056 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "async/AsyncEngine.h" -#include "base/AsyncCallQueue.h" +#include "async/AsyncCallQueue.h" #include "debug/Stream.h" #include "EventLoop.h" #include "fatal.h" diff --git a/src/FwdState.cc b/src/FwdState.cc index 509127fc525..be074a161cf 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -14,8 +14,8 @@ #include "acl/FilledChecklist.h" #include "acl/Gadgets.h" #include "anyp/PortCfg.h" -#include "base/AsyncCallbacks.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCallbacks.h" +#include "async/AsyncCbdataCalls.h" #include "CacheManager.h" #include "CachePeer.h" #include "client_side.h" diff --git a/src/HappyConnOpener.cc b/src/HappyConnOpener.cc index 981216030c7..b76b868ae2b 100644 --- a/src/HappyConnOpener.cc +++ b/src/HappyConnOpener.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "AccessLogEntry.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/CodeContext.h" #include "CachePeer.h" #include "errorpage.h" diff --git a/src/HappyConnOpener.h b/src/HappyConnOpener.h index 9e569c71db9..4957e636956 100644 --- a/src/HappyConnOpener.h +++ b/src/HappyConnOpener.h @@ -8,7 +8,7 @@ #ifndef SQUID_HAPPYCONNOPENER_H #define SQUID_HAPPYCONNOPENER_H -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/JobWait.h" #include "base/RefCount.h" #include "comm.h" diff --git a/src/HttpControlMsg.h b/src/HttpControlMsg.h index 08b4ebe20ad..750a1f0d357 100644 --- a/src/HttpControlMsg.h +++ b/src/HttpControlMsg.h @@ -9,7 +9,7 @@ #ifndef SQUID_HTTP_CONTROL_MSG_H #define SQUID_HTTP_CONTROL_MSG_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "HttpReply.h" class CommIoCbParams; diff --git a/src/PeerPoolMgr.cc b/src/PeerPoolMgr.cc index 6b6b440b6b3..7c76eb8d12c 100644 --- a/src/PeerPoolMgr.cc +++ b/src/PeerPoolMgr.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "AccessLogEntry.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/RunnersRegistry.h" #include "CachePeer.h" #include "CachePeers.h" diff --git a/src/PeerPoolMgr.h b/src/PeerPoolMgr.h index 6f487f54a53..fd99395a493 100644 --- a/src/PeerPoolMgr.h +++ b/src/PeerPoolMgr.h @@ -9,7 +9,7 @@ #ifndef SQUID_PEERPOOLMGR_H #define SQUID_PEERPOOLMGR_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/JobWait.h" #include "comm/forward.h" #include "security/forward.h" diff --git a/src/StoreClient.h b/src/StoreClient.h index 4bd6965b0e9..a1503b08004 100644 --- a/src/StoreClient.h +++ b/src/StoreClient.h @@ -10,7 +10,7 @@ #define SQUID_STORECLIENT_H #include "acl/ChecklistFiller.h" -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/forward.h" #include "dlink.h" #include "store/ParsingBuffer.h" diff --git a/src/adaptation/AccessCheck.cc b/src/adaptation/AccessCheck.cc index 279bdc34bd9..192b20c265a 100644 --- a/src/adaptation/AccessCheck.cc +++ b/src/adaptation/AccessCheck.cc @@ -15,7 +15,7 @@ #include "adaptation/Initiator.h" #include "adaptation/Service.h" #include "adaptation/ServiceGroups.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/TextException.h" #include "ConfigParser.h" #include "globals.h" diff --git a/src/adaptation/AccessCheck.h b/src/adaptation/AccessCheck.h index fc2459a5f95..9373cf6cbdd 100644 --- a/src/adaptation/AccessCheck.h +++ b/src/adaptation/AccessCheck.h @@ -14,7 +14,7 @@ #include "adaptation/forward.h" #include "adaptation/Initiator.h" #include "adaptation/ServiceFilter.h" -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "log/forward.h" class HttpRequest; diff --git a/src/adaptation/Answer.cc b/src/adaptation/Answer.cc index 8ca8c9d14a1..4e4babc4251 100644 --- a/src/adaptation/Answer.cc +++ b/src/adaptation/Answer.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "adaptation/Answer.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "http/Message.h" Adaptation::Answer diff --git a/src/adaptation/Config.h b/src/adaptation/Config.h index 279cee7d4a8..30b215ff65b 100644 --- a/src/adaptation/Config.h +++ b/src/adaptation/Config.h @@ -12,7 +12,7 @@ #include "acl/forward.h" #include "adaptation/Elements.h" #include "adaptation/forward.h" -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "event.h" #include "Notes.h" #include "SquidString.h" diff --git a/src/adaptation/Initiate.cc b/src/adaptation/Initiate.cc index c2d114331b6..d46d7e55113 100644 --- a/src/adaptation/Initiate.cc +++ b/src/adaptation/Initiate.cc @@ -12,7 +12,7 @@ #include "adaptation/Answer.h" #include "adaptation/Initiate.h" #include "adaptation/Initiator.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "http/Message.h" namespace Adaptation diff --git a/src/adaptation/Initiate.h b/src/adaptation/Initiate.h index 3529f654232..910b384b463 100644 --- a/src/adaptation/Initiate.h +++ b/src/adaptation/Initiate.h @@ -10,7 +10,7 @@ #define SQUID_ADAPTATION__INITIATE_H #include "adaptation/forward.h" -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" namespace Adaptation diff --git a/src/adaptation/Initiator.cc b/src/adaptation/Initiator.cc index e9cc7f0d6a7..bd8ccc30b8f 100644 --- a/src/adaptation/Initiator.cc +++ b/src/adaptation/Initiator.cc @@ -11,7 +11,7 @@ #include "squid.h" #include "adaptation/Initiate.h" #include "adaptation/Initiator.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" void Adaptation::Initiator::noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer) diff --git a/src/adaptation/Initiator.h b/src/adaptation/Initiator.h index 46d8c6a2489..6c9656167ea 100644 --- a/src/adaptation/Initiator.h +++ b/src/adaptation/Initiator.h @@ -10,7 +10,7 @@ #define SQUID_ADAPTATION__INITIATOR_H #include "adaptation/forward.h" -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" /* diff --git a/src/adaptation/ecap/XactionRep.cc b/src/adaptation/ecap/XactionRep.cc index 264faac87b7..e44f943d6ec 100644 --- a/src/adaptation/ecap/XactionRep.cc +++ b/src/adaptation/ecap/XactionRep.cc @@ -18,7 +18,7 @@ #include "adaptation/ecap/Config.h" #include "adaptation/ecap/XactionRep.h" #include "adaptation/Initiator.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/TextException.h" #include "format/Format.h" #include "HttpReply.h" diff --git a/src/adaptation/icap/Config.h b/src/adaptation/icap/Config.h index ccf1ec56063..3e443576bef 100644 --- a/src/adaptation/icap/Config.h +++ b/src/adaptation/icap/Config.h @@ -12,7 +12,7 @@ #include "acl/forward.h" #include "adaptation/Config.h" #include "adaptation/icap/ServiceRep.h" -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "event.h" namespace Adaptation diff --git a/src/adaptation/icap/ServiceRep.h b/src/adaptation/icap/ServiceRep.h index 01077009dd3..1bcf08671dc 100644 --- a/src/adaptation/icap/ServiceRep.h +++ b/src/adaptation/icap/ServiceRep.h @@ -13,7 +13,7 @@ #include "adaptation/icap/Elements.h" #include "adaptation/Initiator.h" #include "adaptation/Service.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "cbdata.h" #include "comm.h" #include "FadingCounter.h" diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index c25d36c2a2e..86482284664 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -13,7 +13,7 @@ #include "adaptation/icap/Config.h" #include "adaptation/icap/Launcher.h" #include "adaptation/icap/Xaction.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/IoManip.h" #include "base/JobWait.h" #include "base/TextException.h" diff --git a/src/base/AsyncCall.cc b/src/async/AsyncCall.cc similarity index 97% rename from src/base/AsyncCall.cc rename to src/async/AsyncCall.cc index 8ef8d5e256f..6403526aa90 100644 --- a/src/base/AsyncCall.cc +++ b/src/async/AsyncCall.cc @@ -7,8 +7,8 @@ */ #include "squid.h" -#include "base/AsyncCall.h" -#include "base/AsyncCallQueue.h" +#include "async/AsyncCall.h" +#include "async/AsyncCallQueue.h" #include "base/CodeContext.h" #include "cbdata.h" #include "debug/Stream.h" diff --git a/src/base/AsyncCall.h b/src/async/AsyncCall.h similarity index 99% rename from src/base/AsyncCall.h rename to src/async/AsyncCall.h index 7e1afb1ff2a..093618caa1e 100644 --- a/src/base/AsyncCall.h +++ b/src/async/AsyncCall.h @@ -13,7 +13,7 @@ #include "base/forward.h" #include "base/InstanceId.h" #include "event.h" -#include "RefCount.h" +#include "base/RefCount.h" /** \defgroup AsynCallsAPI Async-Calls API diff --git a/src/base/AsyncCallList.cc b/src/async/AsyncCallList.cc similarity index 94% rename from src/base/AsyncCallList.cc rename to src/async/AsyncCallList.cc index 5710fc2928c..3ac427ecbd4 100644 --- a/src/base/AsyncCallList.cc +++ b/src/async/AsyncCallList.cc @@ -8,8 +8,8 @@ #include "squid.h" #include "base/Assure.h" -#include "base/AsyncCall.h" -#include "base/AsyncCallList.h" +#include "async/AsyncCall.h" +#include "async/AsyncCallList.h" void AsyncCallList::add(const AsyncCall::Pointer &call) diff --git a/src/base/AsyncCallList.h b/src/async/AsyncCallList.h similarity index 97% rename from src/base/AsyncCallList.h rename to src/async/AsyncCallList.h index 36dda7b4641..34f222d507b 100644 --- a/src/base/AsyncCallList.h +++ b/src/async/AsyncCallList.h @@ -9,7 +9,7 @@ #ifndef SQUID_BASE_ASYNCCALLLIST_H #define SQUID_BASE_ASYNCCALLLIST_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/RefCount.h" /// An efficient (but intrusive) AsyncCall storage preserving FIFO order. diff --git a/src/base/AsyncCallQueue.cc b/src/async/AsyncCallQueue.cc similarity index 94% rename from src/base/AsyncCallQueue.cc rename to src/async/AsyncCallQueue.cc index bfa64967e2c..90afa01a538 100644 --- a/src/base/AsyncCallQueue.cc +++ b/src/async/AsyncCallQueue.cc @@ -9,8 +9,8 @@ /* DEBUG: section 41 Event Processing */ #include "squid.h" -#include "base/AsyncCall.h" -#include "base/AsyncCallQueue.h" +#include "async/AsyncCall.h" +#include "async/AsyncCallQueue.h" #include "debug/Stream.h" AsyncCallQueue *AsyncCallQueue::TheInstance = nullptr; diff --git a/src/base/AsyncCallQueue.h b/src/async/AsyncCallQueue.h similarity index 96% rename from src/base/AsyncCallQueue.h rename to src/async/AsyncCallQueue.h index fd844d75b52..ac309beff88 100644 --- a/src/base/AsyncCallQueue.h +++ b/src/async/AsyncCallQueue.h @@ -9,7 +9,7 @@ #ifndef SQUID_ASYNCCALLQUEUE_H #define SQUID_ASYNCCALLQUEUE_H -#include "base/AsyncCallList.h" +#include "async/AsyncCallList.h" #include "base/forward.h" // The queue of asynchronous calls. All calls are fired during a single main diff --git a/src/base/AsyncCallbacks.h b/src/async/AsyncCallbacks.h similarity index 99% rename from src/base/AsyncCallbacks.h rename to src/async/AsyncCallbacks.h index 33173854469..f3ca2301249 100644 --- a/src/base/AsyncCallbacks.h +++ b/src/async/AsyncCallbacks.h @@ -9,8 +9,8 @@ #ifndef SQUID_SRC_BASE_ASYNCCALLBACKS_H #define SQUID_SRC_BASE_ASYNCCALLBACKS_H -#include "base/AsyncCall.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncCall.h" +#include "async/AsyncJobCalls.h" #include "base/TypeTraits.h" /// access to a callback result carried by an asynchronous CallDialer diff --git a/src/base/AsyncCalls.dox b/src/async/AsyncCalls.dox similarity index 100% rename from src/base/AsyncCalls.dox rename to src/async/AsyncCalls.dox diff --git a/src/base/AsyncCbdataCalls.h b/src/async/AsyncCbdataCalls.h similarity index 97% rename from src/base/AsyncCbdataCalls.h rename to src/async/AsyncCbdataCalls.h index fd761e35666..2a64a58f7ae 100644 --- a/src/base/AsyncCbdataCalls.h +++ b/src/async/AsyncCbdataCalls.h @@ -9,7 +9,7 @@ #ifndef SQUID_BASE_ASYNCCBDATACALLS_H #define SQUID_BASE_ASYNCCBDATACALLS_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/CbcPointer.h" // dialer to run cbdata callback functions as Async Calls diff --git a/src/base/AsyncFunCalls.h b/src/async/AsyncFunCalls.h similarity index 98% rename from src/base/AsyncFunCalls.h rename to src/async/AsyncFunCalls.h index 5c076856f73..2675811bd56 100644 --- a/src/base/AsyncFunCalls.h +++ b/src/async/AsyncFunCalls.h @@ -9,7 +9,7 @@ #ifndef SQUID_BASE_ASYNCFUNCALLS_H #define SQUID_BASE_ASYNCFUNCALLS_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include diff --git a/src/base/AsyncJob.cc b/src/async/AsyncJob.cc similarity index 98% rename from src/base/AsyncJob.cc rename to src/async/AsyncJob.cc index 5c63bc6b26c..faf4ccda671 100644 --- a/src/base/AsyncJob.cc +++ b/src/async/AsyncJob.cc @@ -9,9 +9,9 @@ /* DEBUG: section 93 ICAP (RFC 3507) Client */ #include "squid.h" -#include "base/AsyncCall.h" -#include "base/AsyncJob.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncCall.h" +#include "async/AsyncJob.h" +#include "async/AsyncJobCalls.h" #include "base/PackableStream.h" #include "base/TextException.h" #include "cbdata.h" diff --git a/src/base/AsyncJob.h b/src/async/AsyncJob.h similarity index 99% rename from src/base/AsyncJob.h rename to src/async/AsyncJob.h index 93faee98841..a1ffa5048f3 100644 --- a/src/base/AsyncJob.h +++ b/src/async/AsyncJob.h @@ -9,7 +9,7 @@ #ifndef SQUID_ASYNC_JOB_H #define SQUID_ASYNC_JOB_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/InstanceId.h" #include "cbdata.h" diff --git a/src/base/AsyncJobCalls.h b/src/async/AsyncJobCalls.h similarity index 99% rename from src/base/AsyncJobCalls.h rename to src/async/AsyncJobCalls.h index faa3e49bd39..774b3c8028e 100644 --- a/src/base/AsyncJobCalls.h +++ b/src/async/AsyncJobCalls.h @@ -9,7 +9,7 @@ #ifndef SQUID_ASYNCJOBCALLS_H #define SQUID_ASYNCJOBCALLS_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" #include "debug/Stream.h" diff --git a/src/base/AsyncJobs.dox b/src/async/AsyncJobs.dox similarity index 100% rename from src/base/AsyncJobs.dox rename to src/async/AsyncJobs.dox diff --git a/src/async/Makefile.am b/src/async/Makefile.am index e8a42a183a6..2d55a0a7ebd 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -10,5 +10,17 @@ include $(top_srcdir)/src/Common.am noinst_LTLIBRARIES = libasync.la libasync_la_SOURCES = \ + AsyncCall.cc \ + AsyncCall.h \ + AsyncCallbacks.h \ + AsyncCallList.cc \ + AsyncCallList.h \ + AsyncCallQueue.cc \ + AsyncCallQueue.h \ + AsyncCbdataCalls.h \ AsyncEngine.cc \ - AsyncEngine.h \ No newline at end of file + AsyncEngine.h \ + AsyncFunCalls.h \ + AsyncJob.cc \ + AsyncJob.h \ + AsyncJobCalls.h \ No newline at end of file diff --git a/src/base/DelayedAsyncCalls.cc b/src/base/DelayedAsyncCalls.cc index 7e848e5c63a..e90eae091bc 100644 --- a/src/base/DelayedAsyncCalls.cc +++ b/src/base/DelayedAsyncCalls.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/DelayedAsyncCalls.h" #include "debug/Stream.h" diff --git a/src/base/DelayedAsyncCalls.h b/src/base/DelayedAsyncCalls.h index 23f0b28227b..8d41c27fbc1 100644 --- a/src/base/DelayedAsyncCalls.h +++ b/src/base/DelayedAsyncCalls.h @@ -9,7 +9,7 @@ #ifndef SQUID_BASE_DELAYEDASYNCCALLS_H #define SQUID_BASE_DELAYEDASYNCCALLS_H -#include "base/AsyncCallList.h" +#include "async/AsyncCallList.h" /// a FIFO list of async calls, all to be scheduled in FIFO order (on demand via /// the schedule() method or automatically at object destruction time) diff --git a/src/base/JobWait.cc b/src/base/JobWait.cc index e25e791c9bd..3cec468eb6e 100644 --- a/src/base/JobWait.cc +++ b/src/base/JobWait.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/JobWait.h" #include diff --git a/src/base/JobWait.h b/src/base/JobWait.h index 918f118f27b..f95a1d248b8 100644 --- a/src/base/JobWait.h +++ b/src/base/JobWait.h @@ -9,7 +9,7 @@ #ifndef SQUID_BASE_JOBWAIT_H #define SQUID_BASE_JOBWAIT_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" #include diff --git a/src/base/Makefile.am b/src/base/Makefile.am index ba18de1f8cc..f0e0d26c893 100644 --- a/src/base/Makefile.am +++ b/src/base/Makefile.am @@ -12,18 +12,6 @@ noinst_LTLIBRARIES = libbase.la libbase_la_SOURCES = \ Assure.cc \ Assure.h \ - AsyncCall.cc \ - AsyncCall.h \ - AsyncCallList.cc \ - AsyncCallList.h \ - AsyncCallQueue.cc \ - AsyncCallQueue.h \ - AsyncCallbacks.h \ - AsyncCbdataCalls.h \ - AsyncFunCalls.h \ - AsyncJob.cc \ - AsyncJob.h \ - AsyncJobCalls.h \ ByteCounter.h \ CbDataList.h \ CbcPointer.h \ diff --git a/src/base/Subscription.h b/src/base/Subscription.h index dbaf4619a24..7984fee89ec 100644 --- a/src/base/Subscription.h +++ b/src/base/Subscription.h @@ -9,7 +9,7 @@ #ifndef _SQUID_BASE_SUBSCRIPTION_H #define _SQUID_BASE_SUBSCRIPTION_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" /** API for creating a series of AsyncCalls. * This is necessary because the same AsyncCall callback must not be diff --git a/src/client_side.cc b/src/client_side.cc index c9a3a510a6e..aa01c2b5a58 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -60,7 +60,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "anyp/PortCfg.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/Subscription.h" #include "base/TextException.h" #include "CachePeer.h" diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 7f802d4219e..256e2bbacce 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -20,7 +20,7 @@ #include "acl/FilledChecklist.h" #include "acl/Gadgets.h" #include "anyp/PortCfg.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "client_side.h" #include "client_side_reply.h" #include "client_side_request.h" diff --git a/src/clients/Client.cc b/src/clients/Client.cc index 60ab7d08781..832435cc28f 100644 --- a/src/clients/Client.cc +++ b/src/clients/Client.cc @@ -29,7 +29,7 @@ #include "adaptation/AccessCheck.h" #include "adaptation/Answer.h" #include "adaptation/Iterator.h" -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #endif // implemented in client_side_reply.cc until sides have a common parent diff --git a/src/clients/Client.h b/src/clients/Client.h index f60d8cee18e..b1b70e0ef33 100644 --- a/src/clients/Client.h +++ b/src/clients/Client.h @@ -9,7 +9,7 @@ #ifndef SQUID_SRC_CLIENTS_CLIENT_H #define SQUID_SRC_CLIENTS_CLIENT_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "BodyPipe.h" #include "CommCalls.h" #include "FwdState.h" diff --git a/src/clients/FtpClient.cc b/src/clients/FtpClient.cc index fe737832469..0ce1b9e1b2e 100644 --- a/src/clients/FtpClient.cc +++ b/src/clients/FtpClient.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/Range.h" #include "client_side.h" #include "clients/FtpClient.h" diff --git a/src/clients/FtpRelay.cc b/src/clients/FtpRelay.cc index 8720102e6c7..73c8cfd2263 100644 --- a/src/clients/FtpRelay.cc +++ b/src/clients/FtpRelay.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "anyp/PortCfg.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCbdataCalls.h" #include "client_side.h" #include "clients/forward.h" #include "clients/FtpClient.h" diff --git a/src/clients/HttpTunneler.h b/src/clients/HttpTunneler.h index f31311243ae..4b0e02ed1ac 100644 --- a/src/clients/HttpTunneler.h +++ b/src/clients/HttpTunneler.h @@ -9,8 +9,8 @@ #ifndef SQUID_SRC_CLIENTS_HTTP_TUNNELER_H #define SQUID_SRC_CLIENTS_HTTP_TUNNELER_H -#include "base/AsyncCallbacks.h" -#include "base/AsyncJob.h" +#include "async/AsyncCallbacks.h" +#include "async/AsyncJob.h" #include "clients/forward.h" #include "clients/HttpTunnelerAnswer.h" #include "CommCalls.h" diff --git a/src/comm.cc b/src/comm.cc index af51538a81a..865cbdf610f 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -9,7 +9,7 @@ /* DEBUG: section 05 Socket Functions */ #include "squid.h" -#include "base/AsyncFunCalls.h" +#include "async/AsyncFunCalls.h" #include "ClientInfo.h" #include "comm/AcceptLimiter.h" #include "comm/comm_internal.h" diff --git a/src/comm/ConnOpener.h b/src/comm/ConnOpener.h index e4c498bb9e8..baa920cb8b0 100644 --- a/src/comm/ConnOpener.h +++ b/src/comm/ConnOpener.h @@ -9,8 +9,8 @@ #ifndef _SQUID_SRC_COMM_OPENERSTATEDATA_H #define _SQUID_SRC_COMM_OPENERSTATEDATA_H -#include "base/AsyncCall.h" -#include "base/AsyncJob.h" +#include "async/AsyncCall.h" +#include "async/AsyncJob.h" #include "cbdata.h" #include "comm/Flag.h" #include "comm/forward.h" diff --git a/src/comm/IoCallback.h b/src/comm/IoCallback.h index 33681e83f4b..fc7177af9f3 100644 --- a/src/comm/IoCallback.h +++ b/src/comm/IoCallback.h @@ -9,7 +9,7 @@ #ifndef _SQUID_COMM_IOCALLBACK_H #define _SQUID_COMM_IOCALLBACK_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "comm/Flag.h" #include "comm/forward.h" #include "mem/forward.h" diff --git a/src/comm/Read.h b/src/comm/Read.h index cfbdf565647..44441e8349e 100644 --- a/src/comm/Read.h +++ b/src/comm/Read.h @@ -9,7 +9,7 @@ #ifndef _SQUID_COMM_READ_H #define _SQUID_COMM_READ_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "comm/forward.h" #include "CommCalls.h" #include "sbuf/forward.h" diff --git a/src/comm/TcpAcceptor.h b/src/comm/TcpAcceptor.h index b14cac34d55..21947829bf2 100644 --- a/src/comm/TcpAcceptor.h +++ b/src/comm/TcpAcceptor.h @@ -10,7 +10,7 @@ #define SQUID_COMM_TCPACCEPTOR_H #include "anyp/forward.h" -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" #include "base/Subscription.h" #include "comm/Flag.h" diff --git a/src/comm/Write.h b/src/comm/Write.h index 2f3625c9d45..82dd9b1803e 100644 --- a/src/comm/Write.h +++ b/src/comm/Write.h @@ -9,7 +9,7 @@ #ifndef _SQUID_COMM_IOWRITE_H #define _SQUID_COMM_IOWRITE_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "comm/forward.h" #include "mem/forward.h" diff --git a/src/fs/rock/RockHeaderUpdater.cc b/src/fs/rock/RockHeaderUpdater.cc index b659f13f56b..50fbd81adc3 100644 --- a/src/fs/rock/RockHeaderUpdater.cc +++ b/src/fs/rock/RockHeaderUpdater.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "debug/Stream.h" #include "fs/rock/RockHeaderUpdater.h" #include "fs/rock/RockIoState.h" diff --git a/src/fs/rock/RockHeaderUpdater.h b/src/fs/rock/RockHeaderUpdater.h index 44de05ff87f..be31cf1e8ed 100644 --- a/src/fs/rock/RockHeaderUpdater.h +++ b/src/fs/rock/RockHeaderUpdater.h @@ -9,7 +9,7 @@ #ifndef SQUID_FS_ROCK_HEADER_UPDATER_H #define SQUID_FS_ROCK_HEADER_UPDATER_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "cbdata.h" #include "fs/rock/forward.h" #include "fs/rock/RockSwapDir.h" diff --git a/src/fs/rock/RockRebuild.cc b/src/fs/rock/RockRebuild.cc index b594e9a0fe1..9616579865c 100644 --- a/src/fs/rock/RockRebuild.cc +++ b/src/fs/rock/RockRebuild.cc @@ -9,7 +9,7 @@ /* DEBUG: section 79 Disk IO Routines */ #include "squid.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "debug/Messages.h" #include "fs/rock/RockDbCell.h" #include "fs/rock/RockRebuild.h" diff --git a/src/fs/rock/RockRebuild.h b/src/fs/rock/RockRebuild.h index 62ed4d2fc0e..8ce72385102 100644 --- a/src/fs/rock/RockRebuild.h +++ b/src/fs/rock/RockRebuild.h @@ -9,7 +9,7 @@ #ifndef SQUID_FS_ROCK_REBUILD_H #define SQUID_FS_ROCK_REBUILD_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/RunnersRegistry.h" #include "cbdata.h" #include "fs/rock/forward.h" diff --git a/src/helper.cc b/src/helper.cc index 197cd8f16a2..63273198f5e 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -9,7 +9,7 @@ /* DEBUG: section 84 Helper process maintenance */ #include "squid.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCbdataCalls.h" #include "base/Packable.h" #include "base/Raw.h" #include "comm.h" diff --git a/src/helper.h b/src/helper.h index c74e36185b8..5c59a051425 100644 --- a/src/helper.h +++ b/src/helper.h @@ -11,7 +11,7 @@ #ifndef SQUID_HELPER_H #define SQUID_HELPER_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/InstanceId.h" #include "base/RefCount.h" #include "cbdata.h" diff --git a/src/htcp.cc b/src/htcp.cc index 21cdf43c6f3..fd0c4a73091 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -12,7 +12,7 @@ #include "AccessLogEntry.h" #include "acl/Acl.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "CachePeer.h" #include "CachePeers.h" #include "comm.h" diff --git a/src/http.cc b/src/http.cc index 56223e30665..0a7dbc5c5e1 100644 --- a/src/http.cc +++ b/src/http.cc @@ -15,7 +15,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/DelayedAsyncCalls.h" #include "base/Raw.h" #include "base/TextException.h" diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 7c0f571aea7..47e27072a9d 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -17,7 +17,7 @@ #include "AccessLogEntry.h" #include "acl/Acl.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "client_db.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/ipc/Forwarder.cc b/src/ipc/Forwarder.cc index f2afcdca1dc..e056dd3c421 100644 --- a/src/ipc/Forwarder.cc +++ b/src/ipc/Forwarder.cc @@ -9,7 +9,7 @@ /* DEBUG: section 54 Interprocess Communication */ #include "squid.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/TextException.h" #include "errorpage.h" #include "HttpReply.h" diff --git a/src/ipc/Forwarder.h b/src/ipc/Forwarder.h index d12c59126a3..b8a8564ba1b 100644 --- a/src/ipc/Forwarder.h +++ b/src/ipc/Forwarder.h @@ -11,7 +11,7 @@ #ifndef SQUID_IPC_FORWARDER_H #define SQUID_IPC_FORWARDER_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/forward.h" #include "cbdata.h" #include "ipc/Request.h" diff --git a/src/ipc/Inquirer.h b/src/ipc/Inquirer.h index 56ef3c8c5c1..2dc567d678c 100644 --- a/src/ipc/Inquirer.h +++ b/src/ipc/Inquirer.h @@ -11,8 +11,8 @@ #ifndef SQUID_IPC_INQUIRER_H #define SQUID_IPC_INQUIRER_H -#include "base/AsyncJob.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJob.h" +#include "async/AsyncJobCalls.h" #include "base/forward.h" #include "ipc/forward.h" #include "ipc/Request.h" diff --git a/src/ipc/SharedListen.cc b/src/ipc/SharedListen.cc index c1fbafa7f98..ffe4a372957 100644 --- a/src/ipc/SharedListen.cc +++ b/src/ipc/SharedListen.cc @@ -9,7 +9,7 @@ /* DEBUG: section 54 Interprocess Communication */ #include "squid.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/TextException.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/ipc/SharedListen.h b/src/ipc/SharedListen.h index 7a5d9127992..4dbf9eb75db 100644 --- a/src/ipc/SharedListen.h +++ b/src/ipc/SharedListen.h @@ -11,7 +11,7 @@ #ifndef SQUID_IPC_SHARED_LISTEN_H #define SQUID_IPC_SHARED_LISTEN_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/Subscription.h" #include "ip/Address.h" #include "ipc/QuestionerId.h" diff --git a/src/ipc/StartListening.cc b/src/ipc/StartListening.cc index 8a7196524d3..3e9789c0d04 100644 --- a/src/ipc/StartListening.cc +++ b/src/ipc/StartListening.cc @@ -9,7 +9,7 @@ /* DEBUG: section 54 Interprocess Communication */ #include "squid.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/TextException.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/ipc/StartListening.h b/src/ipc/StartListening.h index e4d5df7edb4..542bc8f9f4a 100644 --- a/src/ipc/StartListening.h +++ b/src/ipc/StartListening.h @@ -11,7 +11,7 @@ #ifndef SQUID_IPC_START_LISTENING_H #define SQUID_IPC_START_LISTENING_H -#include "base/AsyncCall.h" +#include "async/AsyncCall.h" #include "base/forward.h" #include "base/Subscription.h" #include "comm/forward.h" diff --git a/src/ipc/UdsOp.h b/src/ipc/UdsOp.h index d594b64c91f..ad60a1b7c67 100644 --- a/src/ipc/UdsOp.h +++ b/src/ipc/UdsOp.h @@ -11,7 +11,7 @@ #ifndef SQUID_IPC_ASYNCUDSOP_H #define SQUID_IPC_ASYNCUDSOP_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/forward.h" #include "cbdata.h" #include "comm/forward.h" diff --git a/src/log/TcpLogger.h b/src/log/TcpLogger.h index 0347a6fc39c..1f494d91ecb 100644 --- a/src/log/TcpLogger.h +++ b/src/log/TcpLogger.h @@ -9,7 +9,7 @@ #ifndef _SQUID_SRC_LOG_TCPLOGGER_H #define _SQUID_SRC_LOG_TCPLOGGER_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/JobWait.h" #include "comm/forward.h" #include "ip/Address.h" diff --git a/src/mgr/Forwarder.cc b/src/mgr/Forwarder.cc index 6ebd12ac4a6..8e6f484491e 100644 --- a/src/mgr/Forwarder.cc +++ b/src/mgr/Forwarder.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "AccessLogEntry.h" -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/TextException.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/mgr/StoreToCommWriter.cc b/src/mgr/StoreToCommWriter.cc index 38c979a1506..f1ec76a345e 100644 --- a/src/mgr/StoreToCommWriter.cc +++ b/src/mgr/StoreToCommWriter.cc @@ -9,7 +9,7 @@ /* DEBUG: section 16 Cache Manager API */ #include "squid.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCbdataCalls.h" #include "base/TextException.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/mgr/StoreToCommWriter.h b/src/mgr/StoreToCommWriter.h index d3d584d2173..f12110f938e 100644 --- a/src/mgr/StoreToCommWriter.h +++ b/src/mgr/StoreToCommWriter.h @@ -11,7 +11,7 @@ #ifndef SQUID_MGR_STORE_TO_COMM_WRITER_H #define SQUID_MGR_STORE_TO_COMM_WRITER_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "comm/forward.h" #include "http/forward.h" #include "mgr/Action.h" diff --git a/src/peer_select.cc b/src/peer_select.cc index c1e0d89612c..adcc8990790 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCbdataCalls.h" #include "base/InstanceId.h" #include "base/TypeTraits.h" #include "CachePeer.h" diff --git a/src/security/PeerConnector.cc b/src/security/PeerConnector.cc index f12229403e7..9220508917c 100644 --- a/src/security/PeerConnector.cc +++ b/src/security/PeerConnector.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/IoManip.h" #include "CachePeer.h" #include "comm/Loops.h" diff --git a/src/security/PeerConnector.h b/src/security/PeerConnector.h index 3c7c01b8dcb..97467c8a348 100644 --- a/src/security/PeerConnector.h +++ b/src/security/PeerConnector.h @@ -11,8 +11,8 @@ #include "acl/Acl.h" #include "acl/ChecklistFiller.h" -#include "base/AsyncCallbacks.h" -#include "base/AsyncJob.h" +#include "async/AsyncCallbacks.h" +#include "async/AsyncJob.h" #include "base/JobWait.h" #include "CommCalls.h" #include "http/forward.h" diff --git a/src/servers/Server.h b/src/servers/Server.h index 01cfae1eff6..e9cb7de3560 100644 --- a/src/servers/Server.h +++ b/src/servers/Server.h @@ -13,7 +13,7 @@ #include "anyp/forward.h" #include "anyp/ProtocolVersion.h" -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "BodyPipe.h" #include "comm/Write.h" #include "CommCalls.h" diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 2c13bdb6c39..fb460bd46ed 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/CbcPointer.h" #include "CachePeer.h" #include "CachePeers.h" diff --git a/src/ssl/ServerBump.h b/src/ssl/ServerBump.h index c8af4d0208e..cd1ab36417e 100644 --- a/src/ssl/ServerBump.h +++ b/src/ssl/ServerBump.h @@ -9,7 +9,7 @@ #ifndef _SQUID_SSL_PEEKER_H #define _SQUID_SSL_PEEKER_H -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #include "base/CbcPointer.h" #include "comm/forward.h" #include "HttpRequest.h" diff --git a/src/ssl/helper.cc b/src/ssl/helper.cc index 42b4594b2e2..006eda9d81e 100644 --- a/src/ssl/helper.cc +++ b/src/ssl/helper.cc @@ -9,7 +9,7 @@ #include "squid.h" #include "../helper.h" #include "anyp/PortCfg.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "cache_cf.h" #include "fs_io.h" #include "helper/Reply.h" diff --git a/src/ssl/helper.h b/src/ssl/helper.h index 0810049e134..6b570fe4482 100644 --- a/src/ssl/helper.h +++ b/src/ssl/helper.h @@ -11,7 +11,7 @@ #if USE_OPENSSL -#include "base/AsyncJobCalls.h" +#include "async/AsyncJobCalls.h" #include "base/ClpMap.h" #include "helper/forward.h" #include "security/forward.h" diff --git a/src/store.cc b/src/store.cc index 97d2e87c610..99389e4156e 100644 --- a/src/store.cc +++ b/src/store.cc @@ -9,7 +9,7 @@ /* DEBUG: section 20 Storage Manager */ #include "squid.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCbdataCalls.h" #include "base/IoManip.h" #include "base/PackableStream.h" #include "base/TextException.h" diff --git a/src/store_client.cc b/src/store_client.cc index adc3cc1f7c6..5db2d8a2319 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCbdataCalls.h" +#include "async/AsyncCbdataCalls.h" #include "base/CodeContext.h" #include "event.h" #include "globals.h" diff --git a/src/tests/stub_libcomm.cc b/src/tests/stub_libcomm.cc index 6dd2bf9b61f..613dce20719 100644 --- a/src/tests/stub_libcomm.cc +++ b/src/tests/stub_libcomm.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/AsyncJob.h" +#include "async/AsyncJob.h" #define STUB_API "comm/libcomm.la" #include "tests/STUB.h" diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index cdacda932de..17f286daad8 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/AsyncCallQueue.h" +#include "async/AsyncCallQueue.h" #include "compat/cppunit.h" #include "event.h" #include "MemBuf.h" diff --git a/src/tunnel.cc b/src/tunnel.cc index dca34bdc5d4..6cfaadb4485 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" -#include "base/AsyncCallbacks.h" +#include "async/AsyncCallbacks.h" #include "base/CbcPointer.h" #include "base/JobWait.h" #include "base/Raw.h" From 594873c0edc15c0775e13cf00af5fb5c06b146a0 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 17:01:16 +0100 Subject: [PATCH 03/15] adjust Makefile.am --- src/Makefile.am | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 8332dce4d81..002bb1d606d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1142,6 +1142,7 @@ tests_testRock_LDADD = \ eui/libeui.la \ $(SSL_LIBS) \ ipc/libipc.la \ + async/libasync.la \ base/libbase.la \ mem/libmem.la \ store/libstore.la \ @@ -1318,6 +1319,7 @@ tests_testUfs_LDADD = \ ipc/libipc.la \ comm/libcomm.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ mem/libmem.la \ store/libstore.la \ @@ -1476,6 +1478,7 @@ tests_testStore_LDADD= \ acl/libstate.la \ acl/libapi.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ ip/libip.la \ fs/libfs.la \ @@ -1659,6 +1662,7 @@ tests_testDiskIO_LDADD = \ $(SSL_LIBS) \ ipc/libipc.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ mem/libmem.la \ sbuf/libsbuf.la \ @@ -1714,6 +1718,7 @@ tests_testACLMaxUserIP_LDADD = \ ip/libip.la \ parser/libparser.la \ sbuf/libsbuf.la \ + async/libasync.la \ base/libbase.la \ $(SSLLIB) \ $(LIBCPPUNIT_LIBS) \ @@ -1958,6 +1963,7 @@ tests_test_http_range_LDADD = \ $(SSL_LIBS) \ ipc/libipc.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ mgr/libmgr.la \ html/libhtml.la \ @@ -2015,6 +2021,7 @@ tests_testHttp1Parser_LDADD= \ parser/libparser.la \ anyp/libanyp.la \ SquidConfig.o \ + async/libasync.la \ base/libbase.la \ ip/libip.la \ sbuf/libsbuf.la \ @@ -2115,6 +2122,7 @@ tests_testHttpReply_LDADD=\ acl/libstate.la \ anyp/libanyp.la \ ip/libip.la \ + async/libasync.la \ base/libbase.la \ ipc/libipc.la \ sbuf/libsbuf.la \ @@ -2333,6 +2341,7 @@ tests_testHttpRequest_LDADD = \ proxyp/libproxyp.la \ parser/libparser.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ mgr/libmgr.la \ html/libhtml.la \ @@ -2622,6 +2631,7 @@ tests_testCacheManager_LDADD = \ acl/libstate.la \ acl/libapi.la \ dns/libdns.la \ + async/libasync.la \ base/libbase.la \ ip/libip.la \ fs/libfs.la \ @@ -2735,6 +2745,7 @@ nodist_tests_testEvent_SOURCES = \ tests/stub_libtime.cc \ tests/stub_tools.cc tests_testEvent_LDADD = \ + async/libasync.la \ base/libbase.la \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ @@ -2751,6 +2762,7 @@ nodist_tests_testEventLoop_SOURCES = \ tests/stub_fatal.cc \ tests/stub_libtime.cc tests_testEventLoop_LDADD = \ + async/libasync.la \ base/libbase.la \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ From 4dc0fc9862ef2d0d938c6019e1faab7ad763d51e Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 18:18:51 +0100 Subject: [PATCH 04/15] add async/forward.h --- src/async/Makefile.am | 3 ++- src/async/forward.h | 21 +++++++++++++++++++++ src/base/forward.h | 7 ++----- 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 src/async/forward.h diff --git a/src/async/Makefile.am b/src/async/Makefile.am index 2d55a0a7ebd..5161b3c4d24 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -23,4 +23,5 @@ libasync_la_SOURCES = \ AsyncFunCalls.h \ AsyncJob.cc \ AsyncJob.h \ - AsyncJobCalls.h \ No newline at end of file + AsyncJobCalls.h \ + forward.h \ No newline at end of file diff --git a/src/async/forward.h b/src/async/forward.h new file mode 100644 index 00000000000..df001a0580d --- /dev/null +++ b/src/async/forward.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 1996-2023 The Squid Software Foundation and contributors + * + * Squid software is distributed under GPLv2+ license and includes + * contributions from numerous individuals and organizations. + * Please see the COPYING and CONTRIBUTORS files for details. + */ + +#ifndef SQUID_SRC_ASYNC_FORWARD_H +#define SQUID_SRC_ASYNC_FORWARD_H + +template class RefCount; //XXX: duplicate from base/forward.h + +class AsyncCall; +class AsyncCallQueue; +class AsyncJob; + +template class AsyncCallback; +using AsyncCallPointer = RefCount; + +#endif /* SQUID_SRC_ASYNC_FORWARD_H */ diff --git a/src/base/forward.h b/src/base/forward.h index 4a5025974bf..a5bea68999c 100644 --- a/src/base/forward.h +++ b/src/base/forward.h @@ -9,9 +9,8 @@ #ifndef SQUID_SRC_BASE_FORWARD_H #define SQUID_SRC_BASE_FORWARD_H -class AsyncCall; -class AsyncCallQueue; -class AsyncJob; +#include "async/forward.h" // XXX: remove before shipping + class CallDialer; class CodeContext; class DelayedAsyncCalls; @@ -23,11 +22,9 @@ class Stopwatch; template class CbcPointer; template class RefCount; template class JobWait; -template class AsyncCallback; typedef CbcPointer AsyncJobPointer; typedef RefCount CodeContextPointer; -using AsyncCallPointer = RefCount; #endif /* SQUID_SRC_BASE_FORWARD_H */ From f0f5f04ffd6b3fd3a868c717045ef0071afcc7dc Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 18:29:40 +0100 Subject: [PATCH 05/15] move DelayedAsyncCalls to async --- src/CompositePoolNode.h | 2 +- src/DelayId.cc | 2 +- src/DelayVector.cc | 2 +- src/MemObject.h | 2 +- src/Store.h | 2 +- src/{base => async}/DelayedAsyncCalls.cc | 2 +- src/{base => async}/DelayedAsyncCalls.h | 0 src/async/Makefile.am | 2 ++ src/async/forward.h | 1 + src/base/Makefile.am | 2 -- src/base/forward.h | 1 - src/http.cc | 2 +- src/tests/stub_comm.cc | 2 +- 13 files changed, 11 insertions(+), 11 deletions(-) rename src/{base => async}/DelayedAsyncCalls.cc (94%) rename src/{base => async}/DelayedAsyncCalls.h (100%) diff --git a/src/CompositePoolNode.h b/src/CompositePoolNode.h index 173b55b9786..0811f546d36 100644 --- a/src/CompositePoolNode.h +++ b/src/CompositePoolNode.h @@ -13,7 +13,7 @@ #if USE_DELAY_POOLS #include "auth/UserRequest.h" -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "DelayIdComposite.h" #include "DelayPools.h" #include "ip/Address.h" diff --git a/src/DelayId.cc b/src/DelayId.cc index 6143ff806f2..b89775cd4a4 100644 --- a/src/DelayId.cc +++ b/src/DelayId.cc @@ -15,7 +15,7 @@ */ #if USE_DELAY_POOLS #include "acl/FilledChecklist.h" -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "client_side_request.h" #include "DelayId.h" #include "DelayPool.h" diff --git a/src/DelayVector.cc b/src/DelayVector.cc index 77696d6337e..1ca39b4a054 100644 --- a/src/DelayVector.cc +++ b/src/DelayVector.cc @@ -12,7 +12,7 @@ #if USE_DELAY_POOLS #include "async/AsyncCall.h" -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "comm/Connection.h" #include "DelayVector.h" diff --git a/src/MemObject.h b/src/MemObject.h index 5e90a4734a7..70d951a81d8 100644 --- a/src/MemObject.h +++ b/src/MemObject.h @@ -9,7 +9,7 @@ #ifndef SQUID_MEMOBJECT_H #define SQUID_MEMOBJECT_H -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "dlink.h" #include "http/RequestMethod.h" #include "HttpReply.h" diff --git a/src/Store.h b/src/Store.h index 3b74f07a6ef..296bd09a597 100644 --- a/src/Store.h +++ b/src/Store.h @@ -9,7 +9,7 @@ #ifndef SQUID_STORE_H #define SQUID_STORE_H -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "base/Packable.h" #include "base/Range.h" #include "base/RefCount.h" diff --git a/src/base/DelayedAsyncCalls.cc b/src/async/DelayedAsyncCalls.cc similarity index 94% rename from src/base/DelayedAsyncCalls.cc rename to src/async/DelayedAsyncCalls.cc index e90eae091bc..7218c27c40b 100644 --- a/src/base/DelayedAsyncCalls.cc +++ b/src/async/DelayedAsyncCalls.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "async/AsyncCall.h" -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "debug/Stream.h" void diff --git a/src/base/DelayedAsyncCalls.h b/src/async/DelayedAsyncCalls.h similarity index 100% rename from src/base/DelayedAsyncCalls.h rename to src/async/DelayedAsyncCalls.h diff --git a/src/async/Makefile.am b/src/async/Makefile.am index 5161b3c4d24..67ea9076974 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -24,4 +24,6 @@ libasync_la_SOURCES = \ AsyncJob.cc \ AsyncJob.h \ AsyncJobCalls.h \ + DelayedAsyncCalls.cc \ + DelayedAsyncCalls.h \ forward.h \ No newline at end of file diff --git a/src/async/forward.h b/src/async/forward.h index df001a0580d..f939df40b11 100644 --- a/src/async/forward.h +++ b/src/async/forward.h @@ -14,6 +14,7 @@ template class RefCount; //XXX: duplicate from base/forwa class AsyncCall; class AsyncCallQueue; class AsyncJob; +class DelayedAsyncCalls; template class AsyncCallback; using AsyncCallPointer = RefCount; diff --git a/src/base/Makefile.am b/src/base/Makefile.am index f0e0d26c893..ef5a67d4ef4 100644 --- a/src/base/Makefile.am +++ b/src/base/Makefile.am @@ -20,8 +20,6 @@ libbase_la_SOURCES = \ ClpMap.h \ CodeContext.cc \ CodeContext.h \ - DelayedAsyncCalls.cc \ - DelayedAsyncCalls.h \ EnumIterator.h \ File.cc \ File.h \ diff --git a/src/base/forward.h b/src/base/forward.h index a5bea68999c..559fe99c9bc 100644 --- a/src/base/forward.h +++ b/src/base/forward.h @@ -13,7 +13,6 @@ class CallDialer; class CodeContext; -class DelayedAsyncCalls; class Raw; class RegexPattern; class ScopedId; diff --git a/src/http.cc b/src/http.cc index 0a7dbc5c5e1..3a1e5439431 100644 --- a/src/http.cc +++ b/src/http.cc @@ -16,7 +16,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "async/AsyncJobCalls.h" -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" #include "base/Raw.h" #include "base/TextException.h" #include "base64.h" diff --git a/src/tests/stub_comm.cc b/src/tests/stub_comm.cc index f1d59cf71db..dccf9b9908f 100644 --- a/src/tests/stub_comm.cc +++ b/src/tests/stub_comm.cc @@ -22,7 +22,7 @@ // void comm_read(const Comm::ConnectionPointer &, char*, int, AsyncCall::Pointer &) STUB /* should be in stub_libbase */ -#include "base/DelayedAsyncCalls.h" +#include "async/DelayedAsyncCalls.h" void DelayedAsyncCalls::delay(const AsyncCall::Pointer &) STUB void DelayedAsyncCalls::schedule() STUB From f0a7c436e8a7016155fc0d7f496b32b44a5000da Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 18:42:44 +0100 Subject: [PATCH 06/15] move JobWait to async/ --- src/FwdState.h | 2 +- src/HappyConnOpener.h | 2 +- src/PeerPoolMgr.h | 2 +- src/adaptation/icap/Xaction.cc | 2 +- src/adaptation/icap/Xaction.h | 2 +- src/{base => async}/JobWait.cc | 2 +- src/{base => async}/JobWait.h | 0 src/async/Makefile.am | 4 +++- src/async/forward.h | 2 ++ src/base/Makefile.am | 2 -- src/base/forward.h | 2 -- src/comm/Connection.cc | 2 +- src/ident/Ident.cc | 2 +- src/log/TcpLogger.h | 2 +- src/security/PeerConnector.h | 2 +- src/servers/FtpServer.h | 2 +- src/tunnel.cc | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) rename src/{base => async}/JobWait.cc (98%) rename src/{base => async}/JobWait.h (100%) diff --git a/src/FwdState.h b/src/FwdState.h index bd99f786c9b..fc2021ae4ba 100644 --- a/src/FwdState.h +++ b/src/FwdState.h @@ -10,7 +10,7 @@ #define SQUID_FORWARD_H #include "base/forward.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "base/RefCount.h" #include "clients/forward.h" #include "comm.h" diff --git a/src/HappyConnOpener.h b/src/HappyConnOpener.h index 4957e636956..3e912982e85 100644 --- a/src/HappyConnOpener.h +++ b/src/HappyConnOpener.h @@ -9,7 +9,7 @@ #ifndef SQUID_HAPPYCONNOPENER_H #define SQUID_HAPPYCONNOPENER_H #include "async/AsyncCallbacks.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "base/RefCount.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/PeerPoolMgr.h b/src/PeerPoolMgr.h index fd99395a493..76dd9b0e720 100644 --- a/src/PeerPoolMgr.h +++ b/src/PeerPoolMgr.h @@ -10,7 +10,7 @@ #define SQUID_PEERPOOLMGR_H #include "async/AsyncJob.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "comm/forward.h" #include "security/forward.h" diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index 86482284664..c78e070212c 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -15,7 +15,7 @@ #include "adaptation/icap/Xaction.h" #include "async/AsyncCallbacks.h" #include "base/IoManip.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "base/TextException.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/adaptation/icap/Xaction.h b/src/adaptation/icap/Xaction.h index 73bc2dd8ad5..123c7001075 100644 --- a/src/adaptation/icap/Xaction.h +++ b/src/adaptation/icap/Xaction.h @@ -12,7 +12,7 @@ #include "AccessLogEntry.h" #include "adaptation/icap/ServiceRep.h" #include "adaptation/Initiate.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "comm/ConnOpener.h" #include "error/forward.h" #include "HttpReply.h" diff --git a/src/base/JobWait.cc b/src/async/JobWait.cc similarity index 98% rename from src/base/JobWait.cc rename to src/async/JobWait.cc index 3cec468eb6e..94e6dc7e4e8 100644 --- a/src/base/JobWait.cc +++ b/src/async/JobWait.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "async/AsyncJobCalls.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include #include diff --git a/src/base/JobWait.h b/src/async/JobWait.h similarity index 100% rename from src/base/JobWait.h rename to src/async/JobWait.h diff --git a/src/async/Makefile.am b/src/async/Makefile.am index 67ea9076974..1a96bc3bd05 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -26,4 +26,6 @@ libasync_la_SOURCES = \ AsyncJobCalls.h \ DelayedAsyncCalls.cc \ DelayedAsyncCalls.h \ - forward.h \ No newline at end of file + forward.h \ + JobWait.cc \ + JobWait.h diff --git a/src/async/forward.h b/src/async/forward.h index f939df40b11..8772ef11bd4 100644 --- a/src/async/forward.h +++ b/src/async/forward.h @@ -14,9 +14,11 @@ template class RefCount; //XXX: duplicate from base/forwa class AsyncCall; class AsyncCallQueue; class AsyncJob; +class CallDialer; class DelayedAsyncCalls; template class AsyncCallback; using AsyncCallPointer = RefCount; +template class JobWait; #endif /* SQUID_SRC_ASYNC_FORWARD_H */ diff --git a/src/base/Makefile.am b/src/base/Makefile.am index ef5a67d4ef4..99d365cc8f6 100644 --- a/src/base/Makefile.am +++ b/src/base/Makefile.am @@ -30,8 +30,6 @@ libbase_la_SOURCES = \ InstanceId.h \ IoManip.cc \ IoManip.h \ - JobWait.cc \ - JobWait.h \ Lock.h \ LookupTable.h \ Packable.h \ diff --git a/src/base/forward.h b/src/base/forward.h index 559fe99c9bc..4ddf88acfa2 100644 --- a/src/base/forward.h +++ b/src/base/forward.h @@ -11,7 +11,6 @@ #include "async/forward.h" // XXX: remove before shipping -class CallDialer; class CodeContext; class Raw; class RegexPattern; @@ -20,7 +19,6 @@ class Stopwatch; template class CbcPointer; template class RefCount; -template class JobWait; typedef CbcPointer AsyncJobPointer; typedef RefCount CodeContextPointer; diff --git a/src/comm/Connection.cc b/src/comm/Connection.cc index 47fa98a17b7..c4d4f88ce8d 100644 --- a/src/comm/Connection.cc +++ b/src/comm/Connection.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "CachePeer.h" #include "cbdata.h" #include "comm.h" diff --git a/src/ident/Ident.cc b/src/ident/Ident.cc index 2f4bd328c05..c56c7ee15c4 100644 --- a/src/ident/Ident.cc +++ b/src/ident/Ident.cc @@ -11,7 +11,7 @@ #include "squid.h" #if USE_IDENT -#include "base/JobWait.h" +#include "async/JobWait.h" #include "comm.h" #include "comm/Connection.h" #include "comm/ConnOpener.h" diff --git a/src/log/TcpLogger.h b/src/log/TcpLogger.h index 1f494d91ecb..0bc0ff293ef 100644 --- a/src/log/TcpLogger.h +++ b/src/log/TcpLogger.h @@ -10,7 +10,7 @@ #define _SQUID_SRC_LOG_TCPLOGGER_H #include "async/AsyncJob.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "comm/forward.h" #include "ip/Address.h" #include "log/forward.h" diff --git a/src/security/PeerConnector.h b/src/security/PeerConnector.h index 97467c8a348..60240fa3a37 100644 --- a/src/security/PeerConnector.h +++ b/src/security/PeerConnector.h @@ -13,7 +13,7 @@ #include "acl/ChecklistFiller.h" #include "async/AsyncCallbacks.h" #include "async/AsyncJob.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "CommCalls.h" #include "http/forward.h" #include "security/EncryptorAnswer.h" diff --git a/src/servers/FtpServer.h b/src/servers/FtpServer.h index 4f6ab9264b9..8a33a5dbb44 100644 --- a/src/servers/FtpServer.h +++ b/src/servers/FtpServer.h @@ -11,7 +11,7 @@ #ifndef SQUID_SERVERS_FTP_SERVER_H #define SQUID_SERVERS_FTP_SERVER_H -#include "base/JobWait.h" +#include "async/JobWait.h" #include "base/Lock.h" #include "client_side.h" #include "comm/forward.h" diff --git a/src/tunnel.cc b/src/tunnel.cc index 6cfaadb4485..202bbcf5adf 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -12,7 +12,7 @@ #include "acl/FilledChecklist.h" #include "async/AsyncCallbacks.h" #include "base/CbcPointer.h" -#include "base/JobWait.h" +#include "async/JobWait.h" #include "base/Raw.h" #include "CachePeer.h" #include "cbdata.h" From 218faefe524a3bca9d2d5b3f4ae90253ac70630c Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 18:46:50 +0100 Subject: [PATCH 07/15] move Subscription.h to async --- src/async/Makefile.am | 3 ++- src/{base => async}/Subscription.h | 0 src/base/Makefile.am | 1 - src/client_side.cc | 2 +- src/comm/TcpAcceptor.h | 2 +- src/ipc/Coordinator.cc | 2 +- src/ipc/SharedListen.h | 2 +- src/ipc/StartListening.h | 2 +- src/ipc/Strand.cc | 2 +- src/main.cc | 2 +- src/servers/FtpServer.cc | 2 +- src/tools.cc | 2 +- 12 files changed, 11 insertions(+), 11 deletions(-) rename src/{base => async}/Subscription.h (100%) diff --git a/src/async/Makefile.am b/src/async/Makefile.am index 1a96bc3bd05..bbcaa621eec 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -28,4 +28,5 @@ libasync_la_SOURCES = \ DelayedAsyncCalls.h \ forward.h \ JobWait.cc \ - JobWait.h + JobWait.h \ + Subscription.h diff --git a/src/base/Subscription.h b/src/async/Subscription.h similarity index 100% rename from src/base/Subscription.h rename to src/async/Subscription.h diff --git a/src/base/Makefile.am b/src/base/Makefile.am index 99d365cc8f6..e10d4b9bb7a 100644 --- a/src/base/Makefile.am +++ b/src/base/Makefile.am @@ -48,7 +48,6 @@ libbase_la_SOURCES = \ RunnersRegistry.h \ Stopwatch.cc \ Stopwatch.h \ - Subscription.h \ SupportOrVeto.h \ TextException.cc \ TextException.h \ diff --git a/src/client_side.cc b/src/client_side.cc index aa01c2b5a58..d6765297dd5 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -61,7 +61,7 @@ #include "acl/FilledChecklist.h" #include "anyp/PortCfg.h" #include "async/AsyncCallbacks.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "base/TextException.h" #include "CachePeer.h" #include "client_db.h" diff --git a/src/comm/TcpAcceptor.h b/src/comm/TcpAcceptor.h index 21947829bf2..6506a6798ce 100644 --- a/src/comm/TcpAcceptor.h +++ b/src/comm/TcpAcceptor.h @@ -12,7 +12,7 @@ #include "anyp/forward.h" #include "async/AsyncJob.h" #include "base/CbcPointer.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "comm/Flag.h" #include "comm/forward.h" diff --git a/src/ipc/Coordinator.cc b/src/ipc/Coordinator.cc index 69a4cfd0536..d54c775b9dc 100644 --- a/src/ipc/Coordinator.cc +++ b/src/ipc/Coordinator.cc @@ -9,7 +9,7 @@ /* DEBUG: section 54 Interprocess Communication */ #include "squid.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "base/TextException.h" #include "CacheManager.h" #include "comm.h" diff --git a/src/ipc/SharedListen.h b/src/ipc/SharedListen.h index 4dbf9eb75db..5a6cc78dff0 100644 --- a/src/ipc/SharedListen.h +++ b/src/ipc/SharedListen.h @@ -12,7 +12,7 @@ #define SQUID_IPC_SHARED_LISTEN_H #include "async/AsyncCall.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "ip/Address.h" #include "ipc/QuestionerId.h" #include "ipc/RequestId.h" diff --git a/src/ipc/StartListening.h b/src/ipc/StartListening.h index 542bc8f9f4a..293ba81c7f0 100644 --- a/src/ipc/StartListening.h +++ b/src/ipc/StartListening.h @@ -13,7 +13,7 @@ #include "async/AsyncCall.h" #include "base/forward.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "comm/forward.h" #include "ip/forward.h" #include "ipc/FdNotes.h" diff --git a/src/ipc/Strand.cc b/src/ipc/Strand.cc index f70869506f0..48fcfe9705e 100644 --- a/src/ipc/Strand.cc +++ b/src/ipc/Strand.cc @@ -9,7 +9,7 @@ /* DEBUG: section 54 Interprocess Communication */ #include "squid.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "base/TextException.h" #include "CacheManager.h" #include "CollapsedForwarding.h" diff --git a/src/main.cc b/src/main.cc index ca1877707ff..ac32fa4080d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -18,7 +18,7 @@ #include "auth/Gadgets.h" #include "AuthReg.h" #include "base/RunnersRegistry.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "base/TextException.h" #include "cache_cf.h" #include "CachePeer.h" diff --git a/src/servers/FtpServer.cc b/src/servers/FtpServer.cc index 976fe4e1f16..3e988f55e3a 100644 --- a/src/servers/FtpServer.cc +++ b/src/servers/FtpServer.cc @@ -13,7 +13,7 @@ #include "base/CharacterSet.h" #include "base/Raw.h" #include "base/RefCount.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "client_side_reply.h" #include "client_side_request.h" #include "clientStream.h" diff --git a/src/tools.cc b/src/tools.cc index 5c11ddb320d..3a4f3d7dd28 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "anyp/PortCfg.h" -#include "base/Subscription.h" +#include "async/Subscription.h" #include "client_side.h" #include "fatal.h" #include "fde.h" From 2f02a25cc5a18841a1cf0b6eb5a33a1b0966c1b9 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 18:56:24 +0100 Subject: [PATCH 08/15] Adjust forwards async/forward.h needs to include base/forward.h to avoid duplicating the declaration of RefCount --- src/async/AsyncCall.h | 2 +- src/async/forward.h | 5 ++++- src/base/forward.h | 5 ----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/async/AsyncCall.h b/src/async/AsyncCall.h index 093618caa1e..05e8b3dfb5c 100644 --- a/src/async/AsyncCall.h +++ b/src/async/AsyncCall.h @@ -10,7 +10,7 @@ #define SQUID_ASYNCCALL_H #include "base/CodeContext.h" -#include "base/forward.h" +#include "async/forward.h" #include "base/InstanceId.h" #include "event.h" #include "base/RefCount.h" diff --git a/src/async/forward.h b/src/async/forward.h index 8772ef11bd4..b4596c64c3c 100644 --- a/src/async/forward.h +++ b/src/async/forward.h @@ -9,7 +9,7 @@ #ifndef SQUID_SRC_ASYNC_FORWARD_H #define SQUID_SRC_ASYNC_FORWARD_H -template class RefCount; //XXX: duplicate from base/forward.h +#include "base/forward.h" class AsyncCall; class AsyncCallQueue; @@ -21,4 +21,7 @@ template class AsyncCallback; using AsyncCallPointer = RefCount; template class JobWait; +template class CbcPointer; +typedef CbcPointer AsyncJobPointer; + #endif /* SQUID_SRC_ASYNC_FORWARD_H */ diff --git a/src/base/forward.h b/src/base/forward.h index 4ddf88acfa2..08658b95767 100644 --- a/src/base/forward.h +++ b/src/base/forward.h @@ -9,18 +9,13 @@ #ifndef SQUID_SRC_BASE_FORWARD_H #define SQUID_SRC_BASE_FORWARD_H -#include "async/forward.h" // XXX: remove before shipping - class CodeContext; class Raw; class RegexPattern; class ScopedId; class Stopwatch; -template class CbcPointer; template class RefCount; - -typedef CbcPointer AsyncJobPointer; typedef RefCount CodeContextPointer; #endif /* SQUID_SRC_BASE_FORWARD_H */ From e6a524055c76fbf77f17ff66596b000d6d2bf3ea Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 19:04:44 +0100 Subject: [PATCH 09/15] event.h -> async/Event.h --- src/FwdState.cc | 2 +- src/Makefile.am | 10 ---------- src/MessageDelayPools.cc | 2 +- src/adaptation/Config.h | 2 +- src/adaptation/icap/Config.h | 2 +- src/async/AsyncCall.h | 2 +- src/{event.cc => async/Event.cc} | 2 +- src/{event.h => async/Event.h} | 0 src/async/Makefile.am | 2 ++ src/auth/CredentialsCache.cc | 2 +- src/auth/User.cc | 2 +- src/auth/digest/Config.cc | 2 +- src/client_db.cc | 2 +- src/comm.cc | 2 +- src/delay_pools.cc | 2 +- src/dns_internal.cc | 2 +- src/fqdncache.cc | 2 +- src/icmp/net_db.cc | 2 +- src/ipcache.cc | 2 +- src/main.cc | 2 +- src/mem/old_api.cc | 2 +- src/neighbors.cc | 2 +- src/peer_digest.cc | 2 +- src/peer_select.cc | 2 +- src/stat.cc | 2 +- src/store.cc | 2 +- src/store_client.cc | 2 +- src/store_digest.cc | 2 +- src/store_rebuild.cc | 2 +- src/tests/stub_event.cc | 2 +- src/tests/testEvent.cc | 2 +- src/tests/testSBuf.cc | 2 +- src/tests/testStoreSupport.cc | 2 +- src/wccp.cc | 2 +- src/wccp2.cc | 2 +- 35 files changed, 34 insertions(+), 42 deletions(-) rename src/{event.cc => async/Event.cc} (99%) rename src/{event.h => async/Event.h} (100%) diff --git a/src/FwdState.cc b/src/FwdState.cc index be074a161cf..ec558f31d2b 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -27,7 +27,7 @@ #include "comm/Loops.h" #include "CommCalls.h" #include "errorpage.h" -#include "event.h" +#include "async/Event.h" #include "fd.h" #include "fde.h" #include "FwdState.h" diff --git a/src/Makefile.am b/src/Makefile.am index 002bb1d606d..56ad8d77e0c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -352,8 +352,6 @@ squid_SOURCES = \ enums.h \ errorpage.cc \ errorpage.h \ - event.cc \ - event.h \ external_acl.cc \ fatal.cc \ fatal.h \ @@ -1071,7 +1069,6 @@ tests_testRock_SOURCES = \ tests/stub_client_side_request.cc \ tests/stub_debug.cc \ tests/stub_errorpage.cc \ - event.cc \ fatal.cc \ fatal.h \ fd.cc \ @@ -1240,7 +1237,6 @@ tests_testUfs_SOURCES = \ tests/stub_client_side_request.cc \ tests/stub_debug.cc \ tests/stub_errorpage.cc \ - event.cc \ tests/stub_fatal.cc \ fatal.h \ fd.cc \ @@ -1415,7 +1411,6 @@ tests_testStore_SOURCES = \ tests/stub_comm.cc \ tests/stub_debug.cc \ tests/stub_errorpage.cc \ - event.cc \ tests/stub_fatal.cc \ fatal.h \ tests/stub_fd.cc \ @@ -1579,7 +1574,6 @@ tests_testDiskIO_SOURCES = \ client_side_request.h \ tests/stub_debug.cc \ tests/stub_errorpage.cc \ - event.cc \ tests/stub_fatal.cc \ fatal.h \ fd.cc \ @@ -1851,7 +1845,6 @@ tests_test_http_range_SOURCES = \ dlink.cc \ dlink.h \ errorpage.cc \ - event.cc \ tests/stub_external_acl.cc \ tests/stub_fatal.cc \ fatal.h \ @@ -2237,7 +2230,6 @@ tests_testHttpRequest_SOURCES = \ dlink.cc \ dlink.h \ errorpage.cc \ - event.cc \ external_acl.cc \ tests/stub_fatal.cc \ fatal.h \ @@ -2533,7 +2525,6 @@ tests_testCacheManager_SOURCES = \ dlink.cc \ dlink.h \ errorpage.cc \ - event.cc \ external_acl.cc \ tests/stub_fatal.cc \ fatal.h \ @@ -2740,7 +2731,6 @@ nodist_tests_testEvent_SOURCES = \ tests/stub_cache_manager.cc \ tests/stub_cbdata.cc \ tests/stub_debug.cc \ - event.cc \ tests/stub_libmem.cc \ tests/stub_libtime.cc \ tests/stub_tools.cc diff --git a/src/MessageDelayPools.cc b/src/MessageDelayPools.cc index 95f5768183b..b5a658d75cc 100644 --- a/src/MessageDelayPools.cc +++ b/src/MessageDelayPools.cc @@ -13,7 +13,7 @@ #include "cache_cf.h" #include "ConfigParser.h" #include "DelaySpec.h" -#include "event.h" +#include "async/Event.h" #include "MessageBucket.h" #include "MessageDelayPools.h" #include "Parsing.h" diff --git a/src/adaptation/Config.h b/src/adaptation/Config.h index 30b215ff65b..e0214c7745f 100644 --- a/src/adaptation/Config.h +++ b/src/adaptation/Config.h @@ -13,7 +13,7 @@ #include "adaptation/Elements.h" #include "adaptation/forward.h" #include "async/AsyncCall.h" -#include "event.h" +#include "async/Event.h" #include "Notes.h" #include "SquidString.h" diff --git a/src/adaptation/icap/Config.h b/src/adaptation/icap/Config.h index 3e443576bef..7bd9799db68 100644 --- a/src/adaptation/icap/Config.h +++ b/src/adaptation/icap/Config.h @@ -13,7 +13,7 @@ #include "adaptation/Config.h" #include "adaptation/icap/ServiceRep.h" #include "async/AsyncCall.h" -#include "event.h" +#include "async/Event.h" namespace Adaptation { diff --git a/src/async/AsyncCall.h b/src/async/AsyncCall.h index 05e8b3dfb5c..69cd62a9c7c 100644 --- a/src/async/AsyncCall.h +++ b/src/async/AsyncCall.h @@ -12,7 +12,7 @@ #include "base/CodeContext.h" #include "async/forward.h" #include "base/InstanceId.h" -#include "event.h" +#include "async/Event.h" #include "base/RefCount.h" /** diff --git a/src/event.cc b/src/async/Event.cc similarity index 99% rename from src/event.cc rename to src/async/Event.cc index 59033388eea..f987465f1fe 100644 --- a/src/event.cc +++ b/src/async/Event.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "base/Random.h" -#include "event.h" +#include "async/Event.h" #include "mgr/Registration.h" #include "Store.h" #include "tools.h" diff --git a/src/event.h b/src/async/Event.h similarity index 100% rename from src/event.h rename to src/async/Event.h diff --git a/src/async/Makefile.am b/src/async/Makefile.am index bbcaa621eec..ad53a2842e0 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -26,6 +26,8 @@ libasync_la_SOURCES = \ AsyncJobCalls.h \ DelayedAsyncCalls.cc \ DelayedAsyncCalls.h \ + Event.cc \ + Event.h \ forward.h \ JobWait.cc \ JobWait.h \ diff --git a/src/auth/CredentialsCache.cc b/src/auth/CredentialsCache.cc index 318e3092bfd..a8449c9928d 100644 --- a/src/auth/CredentialsCache.cc +++ b/src/auth/CredentialsCache.cc @@ -14,7 +14,7 @@ #include "auth/CredentialsCache.h" #include "base/RunnersRegistry.h" #include "debug/Stream.h" -#include "event.h" +#include "async/Event.h" namespace Auth { diff --git a/src/auth/User.cc b/src/auth/User.cc index ccbb6acaaeb..f4afa97c5f7 100644 --- a/src/auth/User.cc +++ b/src/auth/User.cc @@ -16,7 +16,7 @@ #include "auth/Gadgets.h" #include "auth/User.h" #include "auth/UserRequest.h" -#include "event.h" +#include "async/Event.h" #include "globals.h" #include "Store.h" diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc index a3c9e938828..ddcbd9d9250 100644 --- a/src/auth/digest/Config.cc +++ b/src/auth/digest/Config.cc @@ -24,7 +24,7 @@ #include "base/LookupTable.h" #include "base/Random.h" #include "cache_cf.h" -#include "event.h" +#include "async/Event.h" #include "helper.h" #include "HttpHeaderTools.h" #include "HttpReply.h" diff --git a/src/client_db.cc b/src/client_db.cc index ac70562cf24..ebe40eb6156 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -12,7 +12,7 @@ #include "base/RunnersRegistry.h" #include "client_db.h" #include "ClientInfo.h" -#include "event.h" +#include "async/Event.h" #include "format/Token.h" #include "fqdncache.h" #include "ip/Address.h" diff --git a/src/comm.cc b/src/comm.cc index 865cbdf610f..f69bc9c593b 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -21,7 +21,7 @@ #include "comm/Write.h" #include "compat/cmsg.h" #include "DescriptorSet.h" -#include "event.h" +#include "async/Event.h" #include "fd.h" #include "fde.h" #include "globals.h" diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 677097206cb..662cea7dc57 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -29,7 +29,7 @@ #include "DelayTagged.h" #include "DelayUser.h" #include "DelayVector.h" -#include "event.h" +#include "async/Event.h" #include "http/Stream.h" #include "ip/Address.h" #include "MemObject.h" diff --git a/src/dns_internal.cc b/src/dns_internal.cc index fb09f8cc277..7830ba4c657 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -24,7 +24,7 @@ #include "dlink.h" #include "dns/forward.h" #include "dns/rfc3596.h" -#include "event.h" +#include "async/Event.h" #include "fd.h" #include "fde.h" #include "ip/tools.h" diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 78670fb2352..df9e17da60d 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -13,7 +13,7 @@ #include "dns/forward.h" #include "dns/LookupDetails.h" #include "dns/rfc1035.h" -#include "event.h" +#include "async/Event.h" #include "fqdncache.h" #include "helper.h" #include "mgr/Registration.h" diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index 095843ae6b7..c5f2ccb4b15 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -20,7 +20,7 @@ #include "CachePeer.h" #include "CachePeers.h" #include "cbdata.h" -#include "event.h" +#include "async/Event.h" #include "fde.h" #include "fs_io.h" #include "FwdState.h" diff --git a/src/ipcache.cc b/src/ipcache.cc index 41290fdaee5..cc8043b642f 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -16,7 +16,7 @@ #include "dlink.h" #include "dns/LookupDetails.h" #include "dns/rfc3596.h" -#include "event.h" +#include "async/Event.h" #include "ip/Address.h" #include "ip/tools.h" #include "ipcache.h" diff --git a/src/main.cc b/src/main.cc index ac32fa4080d..b89b5380d6e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -33,7 +33,7 @@ #include "DiskIO/DiskIOModule.h" #include "dns/forward.h" #include "errorpage.h" -#include "event.h" +#include "async/Event.h" #include "EventLoop.h" #include "ExternalACL.h" #include "fd.h" diff --git a/src/mem/old_api.cc b/src/mem/old_api.cc index 461be27d02d..f94418cb44d 100644 --- a/src/mem/old_api.cc +++ b/src/mem/old_api.cc @@ -12,7 +12,7 @@ #include "base/PackableStream.h" #include "ClientInfo.h" #include "dlink.h" -#include "event.h" +#include "async/Event.h" #include "fs_io.h" #include "icmp/net_db.h" #include "md5.h" diff --git a/src/neighbors.cc b/src/neighbors.cc index a2719f628f8..e6777692c11 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -20,7 +20,7 @@ #include "comm/Connection.h" #include "comm/ConnOpener.h" #include "debug/Messages.h" -#include "event.h" +#include "async/Event.h" #include "FwdState.h" #include "globals.h" #include "htcp.h" diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 7d290cc9013..6a5e9a21bbf 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -13,7 +13,7 @@ #include "base/IoManip.h" #include "CacheDigest.h" #include "CachePeer.h" -#include "event.h" +#include "async/Event.h" #include "FwdState.h" #include "globals.h" #include "HttpReply.h" diff --git a/src/peer_select.cc b/src/peer_select.cc index adcc8990790..3949cd93005 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -19,7 +19,7 @@ #include "client_side.h" #include "dns/LookupDetails.h" #include "errorpage.h" -#include "event.h" +#include "async/Event.h" #include "FwdState.h" #include "globals.h" #include "hier_code.h" diff --git a/src/stat.cc b/src/stat.cc index e26360930db..70867008198 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -17,7 +17,7 @@ #include "client_side_request.h" #include "comm/Connection.h" #include "comm/Loops.h" -#include "event.h" +#include "async/Event.h" #include "fde.h" #include "format/Token.h" #include "globals.h" diff --git a/src/store.cc b/src/store.cc index 99389e4156e..7da120435c2 100644 --- a/src/store.cc +++ b/src/store.cc @@ -23,7 +23,7 @@ #include "DiskIO/IpcIo/IpcIoFile.h" #endif #include "ETag.h" -#include "event.h" +#include "async/Event.h" #include "fde.h" #include "globals.h" #include "http.h" diff --git a/src/store_client.cc b/src/store_client.cc index 5db2d8a2319..674d4321ff2 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -12,7 +12,7 @@ #include "acl/FilledChecklist.h" #include "async/AsyncCbdataCalls.h" #include "base/CodeContext.h" -#include "event.h" +#include "async/Event.h" #include "globals.h" #include "HttpReply.h" #include "HttpRequest.h" diff --git a/src/store_digest.cc b/src/store_digest.cc index 3cf348ad4eb..b166a74b017 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -16,7 +16,7 @@ #include "squid.h" #include "debug/Stream.h" -#include "event.h" +#include "async/Event.h" #include "globals.h" #include "mgr/Registration.h" #include "store_digest.h" diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index fa0877d80a5..2f57512352c 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "debug/Messages.h" -#include "event.h" +#include "async/Event.h" #include "fde.h" #include "globals.h" #include "md5.h" diff --git a/src/tests/stub_event.cc b/src/tests/stub_event.cc index 97731813544..59331fbf3c2 100644 --- a/src/tests/stub_event.cc +++ b/src/tests/stub_event.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "event.h" +#include "async/Event.h" #define STUB_API "event.cc" #include "tests/STUB.h" diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index 17f286daad8..cf409a28dac 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -9,7 +9,7 @@ #include "squid.h" #include "async/AsyncCallQueue.h" #include "compat/cppunit.h" -#include "event.h" +#include "async/Event.h" #include "MemBuf.h" #include "unitTestMain.h" diff --git a/src/tests/testSBuf.cc b/src/tests/testSBuf.cc index e48a32e7270..b136d157c05 100644 --- a/src/tests/testSBuf.cc +++ b/src/tests/testSBuf.cc @@ -10,7 +10,7 @@ #include "base/CharacterSet.h" #include "base/TextException.h" #include "compat/cppunit.h" -#include "event.h" +#include "async/Event.h" #include "HttpReply.h" #include "MemObject.h" #include "sbuf/Algorithms.h" diff --git a/src/tests/testStoreSupport.cc b/src/tests/testStoreSupport.cc index ffabd592e67..a35f8b541ed 100644 --- a/src/tests/testStoreSupport.cc +++ b/src/tests/testStoreSupport.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "event.h" +#include "async/Event.h" #include "EventLoop.h" #include "testStoreSupport.h" diff --git a/src/wccp.cc b/src/wccp.cc index f73c4af9114..7e82bef546e 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -14,7 +14,7 @@ #include "comm.h" #include "comm/Connection.h" #include "comm/Loops.h" -#include "event.h" +#include "async/Event.h" #include "fatal.h" #include "SquidConfig.h" #include "wccp.h" diff --git a/src/wccp2.cc b/src/wccp2.cc index d46a5f82647..d04e38314ce 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -17,7 +17,7 @@ #include "comm/Connection.h" #include "comm/Loops.h" #include "ConfigParser.h" -#include "event.h" +#include "async/Event.h" #include "ip/Address.h" #include "md5.h" #include "Parsing.h" From c7a705ed77ff74d6ef3ff444478cd69c370b85f4 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 19:11:40 +0100 Subject: [PATCH 10/15] move EventLoop to async/ --- src/Makefile.am | 7 ------- src/adaptation/ecap/ServiceRep.cc | 2 +- src/{ => async}/EventLoop.cc | 2 +- src/{ => async}/EventLoop.h | 0 src/async/Makefile.am | 2 ++ src/main.cc | 2 +- src/tests/stub_EventLoop.cc | 2 +- src/tests/testEventLoop.cc | 2 +- src/tests/testStoreSupport.cc | 2 +- src/tests/testStoreSupport.h | 2 +- 10 files changed, 9 insertions(+), 14 deletions(-) rename src/{ => async}/EventLoop.cc (99%) rename src/{ => async}/EventLoop.h (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 56ad8d77e0c..37bf1df9a39 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -225,8 +225,6 @@ squid_SOURCES = \ Downloader.h \ ETag.cc \ ETag.h \ - EventLoop.cc \ - EventLoop.h \ ExternalACL.h \ ExternalACLEntry.cc \ ExternalACLEntry.h \ @@ -1011,7 +1009,6 @@ tests_testRock_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ ETag.cc \ - EventLoop.cc \ FadingCounter.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ @@ -1179,7 +1176,6 @@ tests_testUfs_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ ETag.cc \ - EventLoop.cc \ FadingCounter.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ @@ -1352,7 +1348,6 @@ tests_testStore_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ ETag.cc \ - EventLoop.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ HttpBody.cc \ @@ -1514,7 +1509,6 @@ tests_testDiskIO_SOURCES = \ ConfigParser.cc \ tests/testDiskIO.cc \ tests/stub_ETag.cc \ - EventLoop.cc \ FadingCounter.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ @@ -2746,7 +2740,6 @@ check_PROGRAMS += tests/testEventLoop tests_testEventLoop_SOURCES = \ tests/testEventLoop.cc nodist_tests_testEventLoop_SOURCES = \ - EventLoop.cc \ tests/stub_SBuf.cc \ tests/stub_debug.cc \ tests/stub_fatal.cc \ diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index e0443d8b316..17fb8aba10b 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -16,7 +16,7 @@ #include "async/AsyncEngine.h" #include "base/TextException.h" #include "debug/Stream.h" -#include "EventLoop.h" +#include "async/EventLoop.h" #include #include diff --git a/src/EventLoop.cc b/src/async/EventLoop.cc similarity index 99% rename from src/EventLoop.cc rename to src/async/EventLoop.cc index d72a8ef0056..48642a2ca28 100644 --- a/src/EventLoop.cc +++ b/src/async/EventLoop.cc @@ -12,7 +12,7 @@ #include "async/AsyncEngine.h" #include "async/AsyncCallQueue.h" #include "debug/Stream.h" -#include "EventLoop.h" +#include "async/EventLoop.h" #include "fatal.h" #include "time/Engine.h" diff --git a/src/EventLoop.h b/src/async/EventLoop.h similarity index 100% rename from src/EventLoop.h rename to src/async/EventLoop.h diff --git a/src/async/Makefile.am b/src/async/Makefile.am index ad53a2842e0..a697d1eeb08 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -28,6 +28,8 @@ libasync_la_SOURCES = \ DelayedAsyncCalls.h \ Event.cc \ Event.h \ + EventLoop.cc \ + EventLoop.h \ forward.h \ JobWait.cc \ JobWait.h \ diff --git a/src/main.cc b/src/main.cc index b89b5380d6e..85690dce7cf 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,7 +34,7 @@ #include "dns/forward.h" #include "errorpage.h" #include "async/Event.h" -#include "EventLoop.h" +#include "async/EventLoop.h" #include "ExternalACL.h" #include "fd.h" #include "format/Token.h" diff --git a/src/tests/stub_EventLoop.cc b/src/tests/stub_EventLoop.cc index 9769ca943da..24b66322ad3 100644 --- a/src/tests/stub_EventLoop.cc +++ b/src/tests/stub_EventLoop.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "EventLoop.h" +#include "async/EventLoop.h" #define STUB_API "EventLoop.cc" #include "tests/STUB.h" diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index 2286dc951bb..fbb1c4b9e8f 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -9,7 +9,7 @@ #include "squid.h" #include "async/AsyncEngine.h" #include "compat/cppunit.h" -#include "EventLoop.h" +#include "async/EventLoop.h" #include "time/Engine.h" #include "unitTestMain.h" diff --git a/src/tests/testStoreSupport.cc b/src/tests/testStoreSupport.cc index a35f8b541ed..24334fc1023 100644 --- a/src/tests/testStoreSupport.cc +++ b/src/tests/testStoreSupport.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "async/Event.h" -#include "EventLoop.h" +#include "async/EventLoop.h" #include "testStoreSupport.h" /* construct a stock loop with event dispatching, a time service that advances diff --git a/src/tests/testStoreSupport.h b/src/tests/testStoreSupport.h index fee352811de..67552b48e28 100644 --- a/src/tests/testStoreSupport.h +++ b/src/tests/testStoreSupport.h @@ -9,7 +9,7 @@ #ifndef SQUID_TESTSTORESUPPORT_H #define SQUID_TESTSTORESUPPORT_H -#include "EventLoop.h" +#include "async/EventLoop.h" #include "time/Engine.h" /* construct a stock loop with event dispatching, a time service that advances From 916de6e276ea62b0becce5c6398d2a18064f57fe Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 19:20:14 +0000 Subject: [PATCH 11/15] Source maintenance --- src/CompositePoolNode.h | 2 +- src/FwdState.cc | 2 +- src/FwdState.h | 2 +- src/MessageDelayPools.cc | 2 +- src/adaptation/ecap/ServiceRep.cc | 2 +- src/adaptation/icap/Xaction.cc | 2 +- src/async/AsyncCall.h | 4 ++-- src/async/AsyncCallList.cc | 2 +- src/async/Event.cc | 2 +- src/async/EventLoop.cc | 4 ++-- src/async/Makefile.am | 6 +++--- src/auth/CredentialsCache.cc | 2 +- src/auth/User.cc | 2 +- src/auth/digest/Config.cc | 2 +- src/client_db.cc | 2 +- src/comm.cc | 2 +- src/comm/TcpAcceptor.h | 2 +- src/delay_pools.cc | 2 +- src/dns_internal.cc | 2 +- src/fqdncache.cc | 2 +- src/icmp/net_db.cc | 2 +- src/ipc/StartListening.h | 2 +- src/ipcache.cc | 2 +- src/main.cc | 6 +++--- src/mem/old_api.cc | 2 +- src/neighbors.cc | 2 +- src/peer_digest.cc | 2 +- src/peer_select.cc | 2 +- src/servers/FtpServer.cc | 2 +- src/stat.cc | 2 +- src/store.cc | 2 +- src/store_client.cc | 2 +- src/store_digest.cc | 2 +- src/store_rebuild.cc | 2 +- src/tests/testEvent.cc | 2 +- src/tests/testEventLoop.cc | 2 +- src/tests/testSBuf.cc | 2 +- src/tunnel.cc | 2 +- src/wccp.cc | 2 +- src/wccp2.cc | 2 +- 40 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/CompositePoolNode.h b/src/CompositePoolNode.h index 0811f546d36..bcf144367c4 100644 --- a/src/CompositePoolNode.h +++ b/src/CompositePoolNode.h @@ -12,8 +12,8 @@ #define COMPOSITEPOOLNODE_H #if USE_DELAY_POOLS -#include "auth/UserRequest.h" #include "async/DelayedAsyncCalls.h" +#include "auth/UserRequest.h" #include "DelayIdComposite.h" #include "DelayPools.h" #include "ip/Address.h" diff --git a/src/FwdState.cc b/src/FwdState.cc index ec558f31d2b..a3179c46e3b 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -16,6 +16,7 @@ #include "anyp/PortCfg.h" #include "async/AsyncCallbacks.h" #include "async/AsyncCbdataCalls.h" +#include "async/Event.h" #include "CacheManager.h" #include "CachePeer.h" #include "client_side.h" @@ -27,7 +28,6 @@ #include "comm/Loops.h" #include "CommCalls.h" #include "errorpage.h" -#include "async/Event.h" #include "fd.h" #include "fde.h" #include "FwdState.h" diff --git a/src/FwdState.h b/src/FwdState.h index fc2021ae4ba..216624e462d 100644 --- a/src/FwdState.h +++ b/src/FwdState.h @@ -9,8 +9,8 @@ #ifndef SQUID_FORWARD_H #define SQUID_FORWARD_H -#include "base/forward.h" #include "async/JobWait.h" +#include "base/forward.h" #include "base/RefCount.h" #include "clients/forward.h" #include "comm.h" diff --git a/src/MessageDelayPools.cc b/src/MessageDelayPools.cc index b5a658d75cc..c17b263ee4b 100644 --- a/src/MessageDelayPools.cc +++ b/src/MessageDelayPools.cc @@ -10,10 +10,10 @@ #if USE_DELAY_POOLS #include "acl/Gadgets.h" +#include "async/Event.h" #include "cache_cf.h" #include "ConfigParser.h" #include "DelaySpec.h" -#include "async/Event.h" #include "MessageBucket.h" #include "MessageDelayPools.h" #include "Parsing.h" diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index 17fb8aba10b..e03863fabfc 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -14,9 +14,9 @@ #include "adaptation/ecap/ServiceRep.h" #include "adaptation/ecap/XactionRep.h" #include "async/AsyncEngine.h" +#include "async/EventLoop.h" #include "base/TextException.h" #include "debug/Stream.h" -#include "async/EventLoop.h" #include #include diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index c78e070212c..8657f30fd3e 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -14,8 +14,8 @@ #include "adaptation/icap/Launcher.h" #include "adaptation/icap/Xaction.h" #include "async/AsyncCallbacks.h" -#include "base/IoManip.h" #include "async/JobWait.h" +#include "base/IoManip.h" #include "base/TextException.h" #include "comm.h" #include "comm/Connection.h" diff --git a/src/async/AsyncCall.h b/src/async/AsyncCall.h index 69cd62a9c7c..dd2564636e0 100644 --- a/src/async/AsyncCall.h +++ b/src/async/AsyncCall.h @@ -9,10 +9,10 @@ #ifndef SQUID_ASYNCCALL_H #define SQUID_ASYNCCALL_H -#include "base/CodeContext.h" +#include "async/Event.h" #include "async/forward.h" +#include "base/CodeContext.h" #include "base/InstanceId.h" -#include "async/Event.h" #include "base/RefCount.h" /** diff --git a/src/async/AsyncCallList.cc b/src/async/AsyncCallList.cc index 3ac427ecbd4..2645b941ed4 100644 --- a/src/async/AsyncCallList.cc +++ b/src/async/AsyncCallList.cc @@ -7,9 +7,9 @@ */ #include "squid.h" -#include "base/Assure.h" #include "async/AsyncCall.h" #include "async/AsyncCallList.h" +#include "base/Assure.h" void AsyncCallList::add(const AsyncCall::Pointer &call) diff --git a/src/async/Event.cc b/src/async/Event.cc index f987465f1fe..fc63b4a92b7 100644 --- a/src/async/Event.cc +++ b/src/async/Event.cc @@ -9,8 +9,8 @@ /* DEBUG: section 41 Event Processing */ #include "squid.h" -#include "base/Random.h" #include "async/Event.h" +#include "base/Random.h" #include "mgr/Registration.h" #include "Store.h" #include "tools.h" diff --git a/src/async/EventLoop.cc b/src/async/EventLoop.cc index 48642a2ca28..a5d95498ee4 100644 --- a/src/async/EventLoop.cc +++ b/src/async/EventLoop.cc @@ -9,10 +9,10 @@ /* DEBUG: section 01 Main Loop */ #include "squid.h" -#include "async/AsyncEngine.h" #include "async/AsyncCallQueue.h" -#include "debug/Stream.h" +#include "async/AsyncEngine.h" #include "async/EventLoop.h" +#include "debug/Stream.h" #include "fatal.h" #include "time/Engine.h" diff --git a/src/async/Makefile.am b/src/async/Makefile.am index a697d1eeb08..26994153b1f 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -12,11 +12,11 @@ noinst_LTLIBRARIES = libasync.la libasync_la_SOURCES = \ AsyncCall.cc \ AsyncCall.h \ - AsyncCallbacks.h \ AsyncCallList.cc \ AsyncCallList.h \ AsyncCallQueue.cc \ AsyncCallQueue.h \ + AsyncCallbacks.h \ AsyncCbdataCalls.h \ AsyncEngine.cc \ AsyncEngine.h \ @@ -30,7 +30,7 @@ libasync_la_SOURCES = \ Event.h \ EventLoop.cc \ EventLoop.h \ - forward.h \ JobWait.cc \ JobWait.h \ - Subscription.h + Subscription.h \ + forward.h diff --git a/src/auth/CredentialsCache.cc b/src/auth/CredentialsCache.cc index a8449c9928d..5e16edb39f8 100644 --- a/src/auth/CredentialsCache.cc +++ b/src/auth/CredentialsCache.cc @@ -10,11 +10,11 @@ #include "squid.h" #include "acl/Gadgets.h" +#include "async/Event.h" #include "auth/Config.h" #include "auth/CredentialsCache.h" #include "base/RunnersRegistry.h" #include "debug/Stream.h" -#include "async/Event.h" namespace Auth { diff --git a/src/auth/User.cc b/src/auth/User.cc index f4afa97c5f7..6d5893d0975 100644 --- a/src/auth/User.cc +++ b/src/auth/User.cc @@ -11,12 +11,12 @@ #include "squid.h" #include "acl/Acl.h" #include "acl/Gadgets.h" +#include "async/Event.h" #include "auth/Config.h" #include "auth/CredentialsCache.h" #include "auth/Gadgets.h" #include "auth/User.h" #include "auth/UserRequest.h" -#include "async/Event.h" #include "globals.h" #include "Store.h" diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc index ddcbd9d9250..c1cdbf22e0e 100644 --- a/src/auth/digest/Config.cc +++ b/src/auth/digest/Config.cc @@ -13,6 +13,7 @@ * See acl.c for access control and client_side.c for auditing */ #include "squid.h" +#include "async/Event.h" #include "auth/CredentialsCache.h" #include "auth/digest/Config.h" #include "auth/digest/Scheme.h" @@ -24,7 +25,6 @@ #include "base/LookupTable.h" #include "base/Random.h" #include "cache_cf.h" -#include "async/Event.h" #include "helper.h" #include "HttpHeaderTools.h" #include "HttpReply.h" diff --git a/src/client_db.cc b/src/client_db.cc index ebe40eb6156..74b21b5fb74 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -9,10 +9,10 @@ /* DEBUG: section 00 Client Database */ #include "squid.h" +#include "async/Event.h" #include "base/RunnersRegistry.h" #include "client_db.h" #include "ClientInfo.h" -#include "async/Event.h" #include "format/Token.h" #include "fqdncache.h" #include "ip/Address.h" diff --git a/src/comm.cc b/src/comm.cc index f69bc9c593b..45841d47258 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -10,6 +10,7 @@ #include "squid.h" #include "async/AsyncFunCalls.h" +#include "async/Event.h" #include "ClientInfo.h" #include "comm/AcceptLimiter.h" #include "comm/comm_internal.h" @@ -21,7 +22,6 @@ #include "comm/Write.h" #include "compat/cmsg.h" #include "DescriptorSet.h" -#include "async/Event.h" #include "fd.h" #include "fde.h" #include "globals.h" diff --git a/src/comm/TcpAcceptor.h b/src/comm/TcpAcceptor.h index 6506a6798ce..3f0a7d7916c 100644 --- a/src/comm/TcpAcceptor.h +++ b/src/comm/TcpAcceptor.h @@ -11,8 +11,8 @@ #include "anyp/forward.h" #include "async/AsyncJob.h" -#include "base/CbcPointer.h" #include "async/Subscription.h" +#include "base/CbcPointer.h" #include "comm/Flag.h" #include "comm/forward.h" diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 662cea7dc57..d3a16115a28 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -16,6 +16,7 @@ #include "squid.h" #if USE_DELAY_POOLS +#include "async/Event.h" #include "client_side_request.h" #include "comm/Connection.h" #include "CommonPool.h" @@ -29,7 +30,6 @@ #include "DelayTagged.h" #include "DelayUser.h" #include "DelayVector.h" -#include "async/Event.h" #include "http/Stream.h" #include "ip/Address.h" #include "MemObject.h" diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 7830ba4c657..c3640cb3ef6 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -9,6 +9,7 @@ /* DEBUG: section 78 DNS lookups; interacts with dns/rfc1035.cc */ #include "squid.h" +#include "async/Event.h" #include "base/CodeContext.h" #include "base/InstanceId.h" #include "base/IoManip.h" @@ -24,7 +25,6 @@ #include "dlink.h" #include "dns/forward.h" #include "dns/rfc3596.h" -#include "async/Event.h" #include "fd.h" #include "fde.h" #include "ip/tools.h" diff --git a/src/fqdncache.cc b/src/fqdncache.cc index df9e17da60d..f73074c6fb4 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -9,11 +9,11 @@ /* DEBUG: section 35 FQDN Cache */ #include "squid.h" +#include "async/Event.h" #include "cbdata.h" #include "dns/forward.h" #include "dns/LookupDetails.h" #include "dns/rfc1035.h" -#include "async/Event.h" #include "fqdncache.h" #include "helper.h" #include "mgr/Registration.h" diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index c5f2ccb4b15..43c51149433 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -17,10 +17,10 @@ */ #include "squid.h" +#include "async/Event.h" #include "CachePeer.h" #include "CachePeers.h" #include "cbdata.h" -#include "async/Event.h" #include "fde.h" #include "fs_io.h" #include "FwdState.h" diff --git a/src/ipc/StartListening.h b/src/ipc/StartListening.h index 293ba81c7f0..701d83653b4 100644 --- a/src/ipc/StartListening.h +++ b/src/ipc/StartListening.h @@ -12,8 +12,8 @@ #define SQUID_IPC_START_LISTENING_H #include "async/AsyncCall.h" -#include "base/forward.h" #include "async/Subscription.h" +#include "base/forward.h" #include "comm/forward.h" #include "ip/forward.h" #include "ipc/FdNotes.h" diff --git a/src/ipcache.cc b/src/ipcache.cc index cc8043b642f..75e532f0dc2 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -9,6 +9,7 @@ /* DEBUG: section 14 IP Cache */ #include "squid.h" +#include "async/Event.h" #include "base/IoManip.h" #include "CacheManager.h" #include "cbdata.h" @@ -16,7 +17,6 @@ #include "dlink.h" #include "dns/LookupDetails.h" #include "dns/rfc3596.h" -#include "async/Event.h" #include "ip/Address.h" #include "ip/tools.h" #include "ipcache.h" diff --git a/src/main.cc b/src/main.cc index 85690dce7cf..14f540af8c6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -14,11 +14,13 @@ #include "acl/Asn.h" #include "acl/forward.h" #include "anyp/UriScheme.h" +#include "async/Event.h" +#include "async/EventLoop.h" +#include "async/Subscription.h" #include "auth/Config.h" #include "auth/Gadgets.h" #include "AuthReg.h" #include "base/RunnersRegistry.h" -#include "async/Subscription.h" #include "base/TextException.h" #include "cache_cf.h" #include "CachePeer.h" @@ -33,8 +35,6 @@ #include "DiskIO/DiskIOModule.h" #include "dns/forward.h" #include "errorpage.h" -#include "async/Event.h" -#include "async/EventLoop.h" #include "ExternalACL.h" #include "fd.h" #include "format/Token.h" diff --git a/src/mem/old_api.cc b/src/mem/old_api.cc index f94418cb44d..67fe137712a 100644 --- a/src/mem/old_api.cc +++ b/src/mem/old_api.cc @@ -9,10 +9,10 @@ /* DEBUG: section 13 High Level Memory Pool Management */ #include "squid.h" +#include "async/Event.h" #include "base/PackableStream.h" #include "ClientInfo.h" #include "dlink.h" -#include "async/Event.h" #include "fs_io.h" #include "icmp/net_db.h" #include "md5.h" diff --git a/src/neighbors.cc b/src/neighbors.cc index e6777692c11..928e6065566 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -11,6 +11,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "anyp/PortCfg.h" +#include "async/Event.h" #include "base/EnumIterator.h" #include "base/IoManip.h" #include "base/PackableStream.h" @@ -20,7 +21,6 @@ #include "comm/Connection.h" #include "comm/ConnOpener.h" #include "debug/Messages.h" -#include "async/Event.h" #include "FwdState.h" #include "globals.h" #include "htcp.h" diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 6a5e9a21bbf..e4f31c30ed0 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -10,10 +10,10 @@ #include "squid.h" #if USE_CACHE_DIGESTS +#include "async/Event.h" #include "base/IoManip.h" #include "CacheDigest.h" #include "CachePeer.h" -#include "async/Event.h" #include "FwdState.h" #include "globals.h" #include "HttpReply.h" diff --git a/src/peer_select.cc b/src/peer_select.cc index 3949cd93005..2ad00e3649f 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -11,6 +11,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "async/AsyncCbdataCalls.h" +#include "async/Event.h" #include "base/InstanceId.h" #include "base/TypeTraits.h" #include "CachePeer.h" @@ -19,7 +20,6 @@ #include "client_side.h" #include "dns/LookupDetails.h" #include "errorpage.h" -#include "async/Event.h" #include "FwdState.h" #include "globals.h" #include "hier_code.h" diff --git a/src/servers/FtpServer.cc b/src/servers/FtpServer.cc index 3e988f55e3a..6be6cdcb7f5 100644 --- a/src/servers/FtpServer.cc +++ b/src/servers/FtpServer.cc @@ -10,10 +10,10 @@ #include "squid.h" #include "acl/FilledChecklist.h" +#include "async/Subscription.h" #include "base/CharacterSet.h" #include "base/Raw.h" #include "base/RefCount.h" -#include "async/Subscription.h" #include "client_side_reply.h" #include "client_side_request.h" #include "clientStream.h" diff --git a/src/stat.cc b/src/stat.cc index 70867008198..b8187899c85 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -10,6 +10,7 @@ #include "squid.h" #include "AccessLogEntry.h" +#include "async/Event.h" #include "CacheDigest.h" #include "CachePeer.h" #include "CachePeers.h" @@ -17,7 +18,6 @@ #include "client_side_request.h" #include "comm/Connection.h" #include "comm/Loops.h" -#include "async/Event.h" #include "fde.h" #include "format/Token.h" #include "globals.h" diff --git a/src/store.cc b/src/store.cc index 7da120435c2..2a3e56c2e84 100644 --- a/src/store.cc +++ b/src/store.cc @@ -22,8 +22,8 @@ #if HAVE_DISKIO_MODULE_IPCIO #include "DiskIO/IpcIo/IpcIoFile.h" #endif -#include "ETag.h" #include "async/Event.h" +#include "ETag.h" #include "fde.h" #include "globals.h" #include "http.h" diff --git a/src/store_client.cc b/src/store_client.cc index 674d4321ff2..18d42786fa6 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -11,8 +11,8 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "async/AsyncCbdataCalls.h" -#include "base/CodeContext.h" #include "async/Event.h" +#include "base/CodeContext.h" #include "globals.h" #include "HttpReply.h" #include "HttpRequest.h" diff --git a/src/store_digest.cc b/src/store_digest.cc index b166a74b017..a40711cffed 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -15,8 +15,8 @@ */ #include "squid.h" -#include "debug/Stream.h" #include "async/Event.h" +#include "debug/Stream.h" #include "globals.h" #include "mgr/Registration.h" #include "store_digest.h" diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 2f57512352c..6ee207f5fff 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -9,8 +9,8 @@ /* DEBUG: section 20 Store Rebuild Routines */ #include "squid.h" -#include "debug/Messages.h" #include "async/Event.h" +#include "debug/Messages.h" #include "fde.h" #include "globals.h" #include "md5.h" diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index cf409a28dac..730a84859c4 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -8,8 +8,8 @@ #include "squid.h" #include "async/AsyncCallQueue.h" -#include "compat/cppunit.h" #include "async/Event.h" +#include "compat/cppunit.h" #include "MemBuf.h" #include "unitTestMain.h" diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index fbb1c4b9e8f..9b91286e256 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -8,8 +8,8 @@ #include "squid.h" #include "async/AsyncEngine.h" -#include "compat/cppunit.h" #include "async/EventLoop.h" +#include "compat/cppunit.h" #include "time/Engine.h" #include "unitTestMain.h" diff --git a/src/tests/testSBuf.cc b/src/tests/testSBuf.cc index b136d157c05..65d29963ee1 100644 --- a/src/tests/testSBuf.cc +++ b/src/tests/testSBuf.cc @@ -7,10 +7,10 @@ */ #include "squid.h" +#include "async/Event.h" #include "base/CharacterSet.h" #include "base/TextException.h" #include "compat/cppunit.h" -#include "async/Event.h" #include "HttpReply.h" #include "MemObject.h" #include "sbuf/Algorithms.h" diff --git a/src/tunnel.cc b/src/tunnel.cc index 202bbcf5adf..8d88615c349 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -11,8 +11,8 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "async/AsyncCallbacks.h" -#include "base/CbcPointer.h" #include "async/JobWait.h" +#include "base/CbcPointer.h" #include "base/Raw.h" #include "CachePeer.h" #include "cbdata.h" diff --git a/src/wccp.cc b/src/wccp.cc index 7e82bef546e..0456dc23039 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -11,10 +11,10 @@ #include "squid.h" #if USE_WCCP +#include "async/Event.h" #include "comm.h" #include "comm/Connection.h" #include "comm/Loops.h" -#include "async/Event.h" #include "fatal.h" #include "SquidConfig.h" #include "wccp.h" diff --git a/src/wccp2.cc b/src/wccp2.cc index d04e38314ce..6944659c763 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -12,12 +12,12 @@ #if USE_WCCPv2 +#include "async/Event.h" #include "cache_cf.h" #include "comm.h" #include "comm/Connection.h" #include "comm/Loops.h" #include "ConfigParser.h" -#include "async/Event.h" #include "ip/Address.h" #include "md5.h" #include "Parsing.h" From becb4aa656b7da5fccb1323c018e6f4549cd94d7 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sat, 13 Jan 2024 23:08:17 +0000 Subject: [PATCH 12/15] fix header in DelayIdComposite.h --- src/DelayIdComposite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DelayIdComposite.h b/src/DelayIdComposite.h index c5426a7f525..7413c23e75f 100644 --- a/src/DelayIdComposite.h +++ b/src/DelayIdComposite.h @@ -12,7 +12,7 @@ #define DELAYIDCOMPOSITE_H #if USE_DELAY_POOLS -#include "base/forward.h" +#include "async/forward.h" #include "base/RefCount.h" #include "fatal.h" From 1f422bb9fb96c014a0307e4066c785db1b8935cb Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 14 Jan 2024 10:40:03 +0000 Subject: [PATCH 13/15] Revert "move EventLoop to async/" This reverts commit c7a705ed77ff74d6ef3ff444478cd69c370b85f4. --- src/{async => }/EventLoop.cc | 3 ++- src/{async => }/EventLoop.h | 0 src/Makefile.am | 7 +++++++ src/adaptation/ecap/ServiceRep.cc | 2 +- src/async/Makefile.am | 3 +-- src/main.cc | 3 ++- src/tests/stub_EventLoop.cc | 2 +- src/tests/testEventLoop.cc | 2 +- src/tests/testStoreSupport.cc | 2 +- src/tests/testStoreSupport.h | 2 +- 10 files changed, 17 insertions(+), 9 deletions(-) rename src/{async => }/EventLoop.cc (98%) rename src/{async => }/EventLoop.h (100%) diff --git a/src/async/EventLoop.cc b/src/EventLoop.cc similarity index 98% rename from src/async/EventLoop.cc rename to src/EventLoop.cc index a5d95498ee4..8b89704121b 100644 --- a/src/async/EventLoop.cc +++ b/src/EventLoop.cc @@ -11,8 +11,9 @@ #include "squid.h" #include "async/AsyncCallQueue.h" #include "async/AsyncEngine.h" -#include "async/EventLoop.h" #include "debug/Stream.h" +#include "debug/Stream.h" +#include "EventLoop.h" #include "fatal.h" #include "time/Engine.h" diff --git a/src/async/EventLoop.h b/src/EventLoop.h similarity index 100% rename from src/async/EventLoop.h rename to src/EventLoop.h diff --git a/src/Makefile.am b/src/Makefile.am index 37bf1df9a39..56ad8d77e0c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -225,6 +225,8 @@ squid_SOURCES = \ Downloader.h \ ETag.cc \ ETag.h \ + EventLoop.cc \ + EventLoop.h \ ExternalACL.h \ ExternalACLEntry.cc \ ExternalACLEntry.h \ @@ -1009,6 +1011,7 @@ tests_testRock_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ ETag.cc \ + EventLoop.cc \ FadingCounter.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ @@ -1176,6 +1179,7 @@ tests_testUfs_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ ETag.cc \ + EventLoop.cc \ FadingCounter.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ @@ -1348,6 +1352,7 @@ tests_testStore_SOURCES = \ ConfigOption.cc \ ConfigParser.cc \ ETag.cc \ + EventLoop.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ HttpBody.cc \ @@ -1509,6 +1514,7 @@ tests_testDiskIO_SOURCES = \ ConfigParser.cc \ tests/testDiskIO.cc \ tests/stub_ETag.cc \ + EventLoop.cc \ FadingCounter.cc \ FileMap.h \ tests/stub_HelperChildConfig.cc \ @@ -2740,6 +2746,7 @@ check_PROGRAMS += tests/testEventLoop tests_testEventLoop_SOURCES = \ tests/testEventLoop.cc nodist_tests_testEventLoop_SOURCES = \ + EventLoop.cc \ tests/stub_SBuf.cc \ tests/stub_debug.cc \ tests/stub_fatal.cc \ diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index e03863fabfc..e0443d8b316 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -14,9 +14,9 @@ #include "adaptation/ecap/ServiceRep.h" #include "adaptation/ecap/XactionRep.h" #include "async/AsyncEngine.h" -#include "async/EventLoop.h" #include "base/TextException.h" #include "debug/Stream.h" +#include "EventLoop.h" #include #include diff --git a/src/async/Makefile.am b/src/async/Makefile.am index 26994153b1f..7d49df76101 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -28,8 +28,7 @@ libasync_la_SOURCES = \ DelayedAsyncCalls.h \ Event.cc \ Event.h \ - EventLoop.cc \ - EventLoop.h \ + forward.h \ JobWait.cc \ JobWait.h \ Subscription.h \ diff --git a/src/main.cc b/src/main.cc index 14f540af8c6..27aafe50b2c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -15,7 +15,6 @@ #include "acl/forward.h" #include "anyp/UriScheme.h" #include "async/Event.h" -#include "async/EventLoop.h" #include "async/Subscription.h" #include "auth/Config.h" #include "auth/Gadgets.h" @@ -35,6 +34,8 @@ #include "DiskIO/DiskIOModule.h" #include "dns/forward.h" #include "errorpage.h" +#include "async/Event.h" +#include "EventLoop.h" #include "ExternalACL.h" #include "fd.h" #include "format/Token.h" diff --git a/src/tests/stub_EventLoop.cc b/src/tests/stub_EventLoop.cc index 24b66322ad3..9769ca943da 100644 --- a/src/tests/stub_EventLoop.cc +++ b/src/tests/stub_EventLoop.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "async/EventLoop.h" +#include "EventLoop.h" #define STUB_API "EventLoop.cc" #include "tests/STUB.h" diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index 9b91286e256..2286dc951bb 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -8,8 +8,8 @@ #include "squid.h" #include "async/AsyncEngine.h" -#include "async/EventLoop.h" #include "compat/cppunit.h" +#include "EventLoop.h" #include "time/Engine.h" #include "unitTestMain.h" diff --git a/src/tests/testStoreSupport.cc b/src/tests/testStoreSupport.cc index 24334fc1023..a35f8b541ed 100644 --- a/src/tests/testStoreSupport.cc +++ b/src/tests/testStoreSupport.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "async/Event.h" -#include "async/EventLoop.h" +#include "EventLoop.h" #include "testStoreSupport.h" /* construct a stock loop with event dispatching, a time service that advances diff --git a/src/tests/testStoreSupport.h b/src/tests/testStoreSupport.h index 67552b48e28..fee352811de 100644 --- a/src/tests/testStoreSupport.h +++ b/src/tests/testStoreSupport.h @@ -9,7 +9,7 @@ #ifndef SQUID_TESTSTORESUPPORT_H #define SQUID_TESTSTORESUPPORT_H -#include "async/EventLoop.h" +#include "EventLoop.h" #include "time/Engine.h" /* construct a stock loop with event dispatching, a time service that advances From 8bffd02a5ba095db85f8d660f88ba38c84d65eb5 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 14 Jan 2024 16:33:42 +0000 Subject: [PATCH 14/15] Revert moving AsyncEngine --- src/{async => }/AsyncEngine.cc | 2 +- src/{async => }/AsyncEngine.h | 0 src/EventLoop.cc | 2 +- src/Makefile.am | 2 ++ src/adaptation/ecap/ServiceRep.cc | 2 +- src/async/Event.h | 2 +- src/async/Makefile.am | 2 -- src/tests/testEventLoop.cc | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename src/{async => }/AsyncEngine.cc (90%) rename src/{async => }/AsyncEngine.h (100%) diff --git a/src/async/AsyncEngine.cc b/src/AsyncEngine.cc similarity index 90% rename from src/async/AsyncEngine.cc rename to src/AsyncEngine.cc index 40177207e14..d7776022855 100644 --- a/src/async/AsyncEngine.cc +++ b/src/AsyncEngine.cc @@ -7,4 +7,4 @@ */ #include "squid.h" -#include "async/AsyncEngine.h" +#include "AsyncEngine.h" diff --git a/src/async/AsyncEngine.h b/src/AsyncEngine.h similarity index 100% rename from src/async/AsyncEngine.h rename to src/AsyncEngine.h diff --git a/src/EventLoop.cc b/src/EventLoop.cc index 8b89704121b..d73210e7ad7 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -10,7 +10,7 @@ #include "squid.h" #include "async/AsyncCallQueue.h" -#include "async/AsyncEngine.h" +#include "AsyncEngine.h" #include "debug/Stream.h" #include "debug/Stream.h" #include "EventLoop.h" diff --git a/src/Makefile.am b/src/Makefile.am index 56ad8d77e0c..c1dc26553dc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -195,6 +195,8 @@ squid_SOURCES = \ $(WINSVC_SOURCE) \ AccessLogEntry.cc \ AccessLogEntry.h \ + AsyncEngine.cc \ + AsyncEngine.h \ AuthReg.h \ BodyPipe.cc \ BodyPipe.h \ diff --git a/src/adaptation/ecap/ServiceRep.cc b/src/adaptation/ecap/ServiceRep.cc index e0443d8b316..dac4a1f92d7 100644 --- a/src/adaptation/ecap/ServiceRep.cc +++ b/src/adaptation/ecap/ServiceRep.cc @@ -13,7 +13,7 @@ #include "adaptation/ecap/Host.h" #include "adaptation/ecap/ServiceRep.h" #include "adaptation/ecap/XactionRep.h" -#include "async/AsyncEngine.h" +#include "AsyncEngine.h" #include "base/TextException.h" #include "debug/Stream.h" #include "EventLoop.h" diff --git a/src/async/Event.h b/src/async/Event.h index e6a9060e809..d93e5fbee15 100644 --- a/src/async/Event.h +++ b/src/async/Event.h @@ -9,7 +9,7 @@ #ifndef SQUID_EVENT_H #define SQUID_EVENT_H -#include "async/AsyncEngine.h" +#include "AsyncEngine.h" #include "base/Packable.h" #include "mem/forward.h" diff --git a/src/async/Makefile.am b/src/async/Makefile.am index 7d49df76101..cb568550404 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -18,8 +18,6 @@ libasync_la_SOURCES = \ AsyncCallQueue.h \ AsyncCallbacks.h \ AsyncCbdataCalls.h \ - AsyncEngine.cc \ - AsyncEngine.h \ AsyncFunCalls.h \ AsyncJob.cc \ AsyncJob.h \ diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index 2286dc951bb..65ea78f9e91 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "async/AsyncEngine.h" +#include "AsyncEngine.h" #include "compat/cppunit.h" #include "EventLoop.h" #include "time/Engine.h" From bd8de57e2f74b52c4941cdf2a28b727112d4336a Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 14 Jan 2024 16:36:52 +0000 Subject: [PATCH 15/15] Source maintenance --- src/EventLoop.cc | 1 - src/async/Makefile.am | 1 - src/main.cc | 1 - 3 files changed, 3 deletions(-) diff --git a/src/EventLoop.cc b/src/EventLoop.cc index d73210e7ad7..052254c6f10 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -12,7 +12,6 @@ #include "async/AsyncCallQueue.h" #include "AsyncEngine.h" #include "debug/Stream.h" -#include "debug/Stream.h" #include "EventLoop.h" #include "fatal.h" #include "time/Engine.h" diff --git a/src/async/Makefile.am b/src/async/Makefile.am index cb568550404..2df79fd5b26 100644 --- a/src/async/Makefile.am +++ b/src/async/Makefile.am @@ -26,7 +26,6 @@ libasync_la_SOURCES = \ DelayedAsyncCalls.h \ Event.cc \ Event.h \ - forward.h \ JobWait.cc \ JobWait.h \ Subscription.h \ diff --git a/src/main.cc b/src/main.cc index 27aafe50b2c..7f0932d2719 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,7 +34,6 @@ #include "DiskIO/DiskIOModule.h" #include "dns/forward.h" #include "errorpage.h" -#include "async/Event.h" #include "EventLoop.h" #include "ExternalACL.h" #include "fd.h"