summaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/atomic
diff options
context:
space:
mode:
authortobo <[email protected]>2026-01-29 19:53:40 +0300
committertobo <[email protected]>2026-01-29 20:22:11 +0300
commit99d70efea929dc771a634078b67cb2f6254ed253 (patch)
treea4c07a1f2a27f2338877fdfd89d0aba1546f4c9e /library/cpp/threading/atomic
parent583d77b2c85ee2b73f8f45d63302f3cf89cb18d0 (diff)
move library/cpp/threading/atomic to library/cpp/deprecated/atomic_bool
commit_hash:0981fb113212b130cb676672e125982188e4fd20
Diffstat (limited to 'library/cpp/threading/atomic')
-rw-r--r--library/cpp/threading/atomic/bool.cpp1
-rw-r--r--library/cpp/threading/atomic/bool.h37
-rw-r--r--library/cpp/threading/atomic/bool_ut.cpp31
-rw-r--r--library/cpp/threading/atomic/ut/ya.make7
-rw-r--r--library/cpp/threading/atomic/ya.make11
5 files changed, 0 insertions, 87 deletions
diff --git a/library/cpp/threading/atomic/bool.cpp b/library/cpp/threading/atomic/bool.cpp
deleted file mode 100644
index 37917e01f12..00000000000
--- a/library/cpp/threading/atomic/bool.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "bool.h"
diff --git a/library/cpp/threading/atomic/bool.h b/library/cpp/threading/atomic/bool.h
deleted file mode 100644
index cd9e3d32ad7..00000000000
--- a/library/cpp/threading/atomic/bool.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#pragma once
-
-#include <atomic>
-
-namespace NAtomic {
- class TBool {
- public:
- TBool() noexcept = default;
-
- TBool(bool val) noexcept
- : Val_(val)
- {
- }
-
- TBool(const TBool& src) noexcept
- : Val_(src.Val_.load())
- {
- }
-
- operator bool() const noexcept {
- return Val_.load();
- }
-
- const TBool& operator=(bool val) noexcept {
- Val_.store(val);
- return *this;
- }
-
- const TBool& operator=(const TBool& src) noexcept {
- Val_.store(src.Val_.load());
- return *this;
- }
-
- private:
- std::atomic<bool> Val_ = false;
- };
-} // namespace NAtomic
diff --git a/library/cpp/threading/atomic/bool_ut.cpp b/library/cpp/threading/atomic/bool_ut.cpp
deleted file mode 100644
index 9481f41d8dc..00000000000
--- a/library/cpp/threading/atomic/bool_ut.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "bool.h"
-
-#include <library/cpp/testing/unittest/registar.h>
-
-Y_UNIT_TEST_SUITE(AtomicBool) {
- Y_UNIT_TEST(ReadWrite) {
- NAtomic::TBool v;
-
- UNIT_ASSERT_VALUES_EQUAL((bool)v, false);
-
- v = true;
-
- UNIT_ASSERT_VALUES_EQUAL((bool)v, true);
-
- v = false;
-
- UNIT_ASSERT_VALUES_EQUAL((bool)v, false);
-
- NAtomic::TBool v2;
-
- UNIT_ASSERT(v == v2);
-
- v2 = true;
-
- UNIT_ASSERT(v != v2);
-
- v = v2;
-
- UNIT_ASSERT(v == v2);
- }
-}
diff --git a/library/cpp/threading/atomic/ut/ya.make b/library/cpp/threading/atomic/ut/ya.make
deleted file mode 100644
index fe2a5ac8f9a..00000000000
--- a/library/cpp/threading/atomic/ut/ya.make
+++ /dev/null
@@ -1,7 +0,0 @@
-UNITTEST_FOR(library/cpp/threading/atomic)
-
-SRCS(
- bool_ut.cpp
-)
-
-END()
diff --git a/library/cpp/threading/atomic/ya.make b/library/cpp/threading/atomic/ya.make
deleted file mode 100644
index 34b4ca4b208..00000000000
--- a/library/cpp/threading/atomic/ya.make
+++ /dev/null
@@ -1,11 +0,0 @@
-LIBRARY()
-
-SRCS(
- bool.cpp
-)
-
-END()
-
-RECURSE_FOR_TESTS(
- ut
-)