From 5ea13208218d9d4f5b6fdacbf4bedcfdc63919db Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Tue, 5 Nov 2019 10:28:48 -0500 Subject: [PATCH] boost::atomic -> std::atomic --- utils/common/poolallocator.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/common/poolallocator.h b/utils/common/poolallocator.h index 1dd36951c..d02db5d55 100644 --- a/utils/common/poolallocator.h +++ b/utils/common/poolallocator.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include namespace utils { @@ -90,7 +90,7 @@ private: uint64_t memUsage; uint8_t* nextAlloc; bool useLock; - boost::atomic lock; + std::atomic lock; struct OOBMemInfo { @@ -107,14 +107,14 @@ inline void* PoolAllocator::allocate(uint64_t size) bool _false = false; if (useLock) - while (!lock.compare_exchange_weak(_false, true, boost::memory_order_acquire)) + while (!lock.compare_exchange_weak(_false, true, std::memory_order_acquire)) _false = false; if (size > allocSize) { ret = allocOOB(size); if (useLock) - lock.store(false, boost::memory_order_release); + lock.store(false, std::memory_order_release); return ret; } @@ -126,7 +126,7 @@ inline void* PoolAllocator::allocate(uint64_t size) capacityRemaining -= size; memUsage += size; if (useLock) - lock.store(false, boost::memory_order_release); + lock.store(false, std::memory_order_release); return ret; }