From bc8b652247f0f105ff344cea5bc4651e5e71cc3b Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Wed, 16 Jan 2013 21:25:35 -0700 Subject: [PATCH] Moved StoreMapSlice declaration and ctor definition into StoreMap.h as too small/trivial to warrant dedicated source files. --- src/ipc/Makefile.am | 2 -- src/ipc/StoreMap.h | 15 ++++++++++++++- src/ipc/StoreMapSlice.cc | 12 ------------ src/ipc/StoreMapSlice.h | 24 ------------------------ 4 files changed, 14 insertions(+), 39 deletions(-) delete mode 100644 src/ipc/StoreMapSlice.cc delete mode 100644 src/ipc/StoreMapSlice.h diff --git a/src/ipc/Makefile.am b/src/ipc/Makefile.am index cf4932cc6d..3a08d6ea46 100644 --- a/src/ipc/Makefile.am +++ b/src/ipc/Makefile.am @@ -21,8 +21,6 @@ libipc_la_SOURCES = \ StartListening.h \ StoreMap.cc \ StoreMap.h \ - StoreMapSlice.cc \ - StoreMapSlice.h \ StrandCoord.cc \ StrandCoord.h \ StrandCoords.h \ diff --git a/src/ipc/StoreMap.h b/src/ipc/StoreMap.h index bacdad0276..a8975301fb 100644 --- a/src/ipc/StoreMap.h +++ b/src/ipc/StoreMap.h @@ -1,14 +1,27 @@ #ifndef SQUID_IPC_STORE_MAP_H #define SQUID_IPC_STORE_MAP_H +#include "typedefs.h" #include "ipc/ReadWriteLock.h" #include "ipc/mem/FlexibleArray.h" #include "ipc/mem/Pointer.h" -#include "ipc/StoreMapSlice.h" namespace Ipc { +typedef uint32_t StoreMapSliceId; + +/// a piece of Store entry, linked to other pieces, forming a chain +class StoreMapSlice +{ +public: + StoreMapSlice(): next(0), size(0) {} + + StoreMapSliceId next; ///< ID of the next slice occupied by the entry + uint32_t size; ///< slice contents size +}; + + /// Maintains shareable information about a StoreEntry as a whole. /// An anchor points to one or more StoreEntry slices. This is the /// only lockable part of shared StoreEntry information, providing diff --git a/src/ipc/StoreMapSlice.cc b/src/ipc/StoreMapSlice.cc deleted file mode 100644 index e6b4c1f73e..0000000000 --- a/src/ipc/StoreMapSlice.cc +++ /dev/null @@ -1,12 +0,0 @@ -/* - * DEBUG: section 54 Interprocess Communication - */ - -#include "squid.h" -#include "ipc/StoreMapSlice.h" -#include "tools.h" - -Ipc::StoreMapSlice::StoreMapSlice() -{ - memset(this, 0, sizeof(*this)); -} diff --git a/src/ipc/StoreMapSlice.h b/src/ipc/StoreMapSlice.h deleted file mode 100644 index 1ba775a4d1..0000000000 --- a/src/ipc/StoreMapSlice.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SQUID_IPC_STORE_MAP_SLICE_H -#define SQUID_IPC_STORE_MAP_SLICE_H - -#include "typedefs.h" - -namespace Ipc -{ - -typedef uint32_t StoreMapSliceId; - -/// a piece of Store entry, linked to other pieces, forming a chain -class StoreMapSlice -{ -public: - StoreMapSlice(): next(0), /* location(0), */ size(0) {} - - StoreMapSliceId next; ///< ID of the next slice occupied by the entry -// uint32_t location; ///< slice contents location - uint32_t size; ///< slice contents size -}; - -} // namespace Ipc - -#endif /* SQUID_IPC_STORE_MAP_SLICE_H */ -- 2.47.2