diff options
author | vvvv <vvvv@yandex-team.com> | 2024-11-08 18:35:18 +0300 |
---|---|---|
committer | Vitaly Stoyan <vvvv@ydb.tech> | 2024-11-09 12:01:22 +0300 |
commit | 84f7474e59875188f5bbde680babe0398bd5ce01 (patch) | |
tree | a5ac4b67fb41c7f90376db9f6c52ece8c2b8a00a | |
parent | c1f4e6b4286bb6e9a261c1e8805c19b0769f2b9f (diff) | |
download | ydb-84f7474e59875188f5bbde680babe0398bd5ce01.tar.gz |
std::atomic
commit_hash:be10606b22b15d660282895983c88ae5a0db0be9
-rw-r--r-- | yql/essentials/minikql/aligned_page_pool.cpp | 9 | ||||
-rw-r--r-- | yql/essentials/minikql/ya.make | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/yql/essentials/minikql/aligned_page_pool.cpp b/yql/essentials/minikql/aligned_page_pool.cpp index e7ff7c1a89..6c149ca84c 100644 --- a/yql/essentials/minikql/aligned_page_pool.cpp +++ b/yql/essentials/minikql/aligned_page_pool.cpp @@ -1,6 +1,5 @@ #include "aligned_page_pool.h" #include "util/string/builder.h" -#include <contrib/ydb/library/actors/util/intrinsics.h> #include <util/generic/yexception.h> #include <util/string/cast.h> @@ -49,7 +48,7 @@ public: void* GetPage() { void *page = nullptr; if (Pages.Dequeue(&page)) { - AtomicDecrement(Count); + --Count; return page; } @@ -57,7 +56,7 @@ public: } ui64 GetPageCount() const { - return RelaxedLoad(&Count); + return Count.load(std::memory_order_relaxed); } size_t GetPageSize() const { @@ -75,7 +74,7 @@ private: FreePage(addr); return GetPageSize(); #else - AtomicIncrement(Count); + ++Count; Pages.Enqueue(addr); return 0; #endif @@ -88,7 +87,7 @@ private: private: const size_t PageSize; - TAtomic Count = 0; + std::atomic<ui64> Count = 0; TLockFreeStack<void*> Pages; }; diff --git a/yql/essentials/minikql/ya.make b/yql/essentials/minikql/ya.make index 7060a6a86b..5c1d732f77 100644 --- a/yql/essentials/minikql/ya.make +++ b/yql/essentials/minikql/ya.make @@ -55,7 +55,6 @@ SRCS( PEERDIR( contrib/libs/apache/arrow contrib/libs/cctz/tzdata - contrib/ydb/library/actors/util library/cpp/deprecated/enum_codegen library/cpp/enumbitset library/cpp/monlib/dynamic_counters |