From: Amos Jeffries Date: Tue, 2 Jun 2015 15:41:52 +0000 (-0700) Subject: Convert MemMap to std::atomic X-Git-Tag: merge-candidate-3-v1~72^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75a24b04664e8aa1519801b6fb6ba2dd10173289;p=thirdparty%2Fsquid.git Convert MemMap to std::atomic --- diff --git a/src/ipc/MemMap.h b/src/ipc/MemMap.h index d31179e542..0c3f1eab1f 100644 --- a/src/ipc/MemMap.h +++ b/src/ipc/MemMap.h @@ -10,7 +10,6 @@ #define SQUID_IPC_STORE_MAP_H #include "Debug.h" -#include "ipc/AtomicWord.h" #include "ipc/mem/FlexibleArray.h" #include "ipc/mem/Pointer.h" #include "ipc/ReadWriteLock.h" @@ -18,6 +17,8 @@ #include "tools.h" #include "typedefs.h" +#include + namespace Ipc { @@ -40,7 +41,7 @@ public: bool reading() const { return lock.readers; } bool writing() const { return lock.writing; } - Atomic::WordT waitingToBeFreed; ///< may be accessed w/o a lock + std::atomic waitingToBeFreed; ///< may be accessed w/o a lock mutable ReadWriteLock lock; ///< protects slot data below unsigned char key[MEMMAP_SLOT_KEY_SIZE]; ///< The entry key unsigned char p[MEMMAP_SLOT_DATA_SIZE]; ///< The memory block; @@ -67,7 +68,7 @@ public: const int limit; ///< maximum number of map slots const size_t extrasSize; ///< size of slot extra data - Atomic::Word count; ///< current number of map slots + std::atomic count; ///< current number of map slots Ipc::Mem::FlexibleArray slots; ///< storage };