aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-06-28 12:58:00 +0300
committerthegeorg <thegeorg@yandex-team.ru>2022-06-28 12:58:00 +0300
commit7a8efeb2c9c204feb9cc44b987708e97f05a8aec (patch)
tree853f783c59eeefaa59ec6f96472d09ffa1ff3fcd
parent96581085023a176eeba4a19f872c3f7eec0e00b1 (diff)
downloadydb-7a8efeb2c9c204feb9cc44b987708e97f05a8aec.tar.gz
Update sysincls to acknowledge stdatomic introduction to libcxx
ref:7357ae7183b7d526a4296873c921f4277c6d0d5c
-rw-r--r--build/sysincl/libc-to-nothing.yml1
-rw-r--r--build/sysincl/stl-to-libcxx.yml39
-rw-r--r--build/sysincl/unsorted.yml1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stdatomic.h235
4 files changed, 256 insertions, 20 deletions
diff --git a/build/sysincl/libc-to-nothing.yml b/build/sysincl/libc-to-nothing.yml
index 15a413cdbde..ad4ef9375dd 100644
--- a/build/sysincl/libc-to-nothing.yml
+++ b/build/sysincl/libc-to-nothing.yml
@@ -76,6 +76,7 @@
- spawn.h
- stdalign.h
- stdarg.h
+ - stdatomic.h
- stdio_ext.h
- stdnoreturn.h
- strings.h
diff --git a/build/sysincl/stl-to-libcxx.yml b/build/sysincl/stl-to-libcxx.yml
index d08ea44629d..22a6b45dc26 100644
--- a/build/sysincl/stl-to-libcxx.yml
+++ b/build/sysincl/stl-to-libcxx.yml
@@ -8,25 +8,26 @@
# We want musl to resolve itself without these sysincls, but its test must have them
- source_filter: "^(?!(contrib/libs/libunistring|contrib/libs/musl|contrib/tools/yasm)).*|^contrib/libs/musl/tests"
includes:
- - complex.h: contrib/libs/cxxsupp/libcxx/include/complex.h
- - ctype.h: contrib/libs/cxxsupp/libcxx/include/ctype.h
- - errno.h: contrib/libs/cxxsupp/libcxx/include/errno.h
- - fenv.h: contrib/libs/cxxsupp/libcxx/include/fenv.h
- - float.h: contrib/libs/cxxsupp/libcxx/include/float.h
- - inttypes.h: contrib/libs/cxxsupp/libcxx/include/inttypes.h
- - limits.h: contrib/libs/cxxsupp/libcxx/include/limits.h
- - locale.h: contrib/libs/cxxsupp/libcxx/include/locale.h
- - math.h: contrib/libs/cxxsupp/libcxx/include/math.h
- - setjmp.h: contrib/libs/cxxsupp/libcxx/include/setjmp.h
- - stdbool.h: contrib/libs/cxxsupp/libcxx/include/stdbool.h
- - stddef.h: contrib/libs/cxxsupp/libcxx/include/stddef.h
- - stdint.h: contrib/libs/cxxsupp/libcxx/include/stdint.h
- - stdio.h: contrib/libs/cxxsupp/libcxx/include/stdio.h
- - stdlib.h: contrib/libs/cxxsupp/libcxx/include/stdlib.h
- - string.h: contrib/libs/cxxsupp/libcxx/include/string.h
- - tgmath.h: contrib/libs/cxxsupp/libcxx/include/tgmath.h
- - wchar.h: contrib/libs/cxxsupp/libcxx/include/wchar.h
- - wctype.h: contrib/libs/cxxsupp/libcxx/include/wctype.h
+ - complex.h: contrib/libs/cxxsupp/libcxx/include/complex.h
+ - ctype.h: contrib/libs/cxxsupp/libcxx/include/ctype.h
+ - errno.h: contrib/libs/cxxsupp/libcxx/include/errno.h
+ - fenv.h: contrib/libs/cxxsupp/libcxx/include/fenv.h
+ - float.h: contrib/libs/cxxsupp/libcxx/include/float.h
+ - inttypes.h: contrib/libs/cxxsupp/libcxx/include/inttypes.h
+ - limits.h: contrib/libs/cxxsupp/libcxx/include/limits.h
+ - locale.h: contrib/libs/cxxsupp/libcxx/include/locale.h
+ - math.h: contrib/libs/cxxsupp/libcxx/include/math.h
+ - setjmp.h: contrib/libs/cxxsupp/libcxx/include/setjmp.h
+ - stdatomic.h: contrib/libs/cxxsupp/libcxx/include/stdatomic.h
+ - stdbool.h: contrib/libs/cxxsupp/libcxx/include/stdbool.h
+ - stddef.h: contrib/libs/cxxsupp/libcxx/include/stddef.h
+ - stdint.h: contrib/libs/cxxsupp/libcxx/include/stdint.h
+ - stdio.h: contrib/libs/cxxsupp/libcxx/include/stdio.h
+ - stdlib.h: contrib/libs/cxxsupp/libcxx/include/stdlib.h
+ - string.h: contrib/libs/cxxsupp/libcxx/include/string.h
+ - tgmath.h: contrib/libs/cxxsupp/libcxx/include/tgmath.h
+ - wchar.h: contrib/libs/cxxsupp/libcxx/include/wchar.h
+ - wctype.h: contrib/libs/cxxsupp/libcxx/include/wctype.h
- includes:
- cxxabi.h:
diff --git a/build/sysincl/unsorted.yml b/build/sysincl/unsorted.yml
index dcfe0a969a1..66cd01ebec1 100644
--- a/build/sysincl/unsorted.yml
+++ b/build/sysincl/unsorted.yml
@@ -262,7 +262,6 @@
- cpuid.h
- nan.h
- omp.h
- - stdatomic.h
- unlocked-io.h
- cygwin/version.h
- zircon/syscalls.h
diff --git a/contrib/libs/cxxsupp/libcxx/include/stdatomic.h b/contrib/libs/cxxsupp/libcxx/include/stdatomic.h
new file mode 100644
index 00000000000..d9550c44061
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/stdatomic.h
@@ -0,0 +1,235 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_STDATOMIC_H
+#define _LIBCPP_STDATOMIC_H
+
+/*
+ stdatomic.h synopsis
+
+template<class T>
+ using std-atomic = std::atomic<T>; // exposition only
+
+#define _Atomic(T) std-atomic<T>
+
+#define ATOMIC_BOOL_LOCK_FREE see below
+#define ATOMIC_CHAR_LOCK_FREE see below
+#define ATOMIC_CHAR16_T_LOCK_FREE see below
+#define ATOMIC_CHAR32_T_LOCK_FREE see below
+#define ATOMIC_WCHAR_T_LOCK_FREE see below
+#define ATOMIC_SHORT_LOCK_FREE see below
+#define ATOMIC_INT_LOCK_FREE see below
+#define ATOMIC_LONG_LOCK_FREE see below
+#define ATOMIC_LLONG_LOCK_FREE see below
+#define ATOMIC_POINTER_LOCK_FREE see below
+
+using std::memory_order // see below
+using std::memory_order_relaxed // see below
+using std::memory_order_consume // see below
+using std::memory_order_acquire // see below
+using std::memory_order_release // see below
+using std::memory_order_acq_rel // see below
+using std::memory_order_seq_cst // see below
+
+using std::atomic_flag // see below
+
+using std::atomic_bool // see below
+using std::atomic_char // see below
+using std::atomic_schar // see below
+using std::atomic_uchar // see below
+using std::atomic_short // see below
+using std::atomic_ushort // see below
+using std::atomic_int // see below
+using std::atomic_uint // see below
+using std::atomic_long // see below
+using std::atomic_ulong // see below
+using std::atomic_llong // see below
+using std::atomic_ullong // see below
+using std::atomic_char8_t // see below
+using std::atomic_char16_t // see below
+using std::atomic_char32_t // see below
+using std::atomic_wchar_t // see below
+using std::atomic_int8_t // see below
+using std::atomic_uint8_t // see below
+using std::atomic_int16_t // see below
+using std::atomic_uint16_t // see below
+using std::atomic_int32_t // see below
+using std::atomic_uint32_t // see below
+using std::atomic_int64_t // see below
+using std::atomic_uint64_t // see below
+using std::atomic_int_least8_t // see below
+using std::atomic_uint_least8_t // see below
+using std::atomic_int_least16_t // see below
+using std::atomic_uint_least16_t // see below
+using std::atomic_int_least32_t // see below
+using std::atomic_uint_least32_t // see below
+using std::atomic_int_least64_t // see below
+using std::atomic_uint_least64_t // see below
+using std::atomic_int_fast8_t // see below
+using std::atomic_uint_fast8_t // see below
+using std::atomic_int_fast16_t // see below
+using std::atomic_uint_fast16_t // see below
+using std::atomic_int_fast32_t // see below
+using std::atomic_uint_fast32_t // see below
+using std::atomic_int_fast64_t // see below
+using std::atomic_uint_fast64_t // see below
+using std::atomic_intptr_t // see below
+using std::atomic_uintptr_t // see below
+using std::atomic_size_t // see below
+using std::atomic_ptrdiff_t // see below
+using std::atomic_intmax_t // see below
+using std::atomic_uintmax_t // see below
+
+using std::atomic_is_lock_free // see below
+using std::atomic_load // see below
+using std::atomic_load_explicit // see below
+using std::atomic_store // see below
+using std::atomic_store_explicit // see below
+using std::atomic_exchange // see below
+using std::atomic_exchange_explicit // see below
+using std::atomic_compare_exchange_strong // see below
+using std::atomic_compare_exchange_strong_explicit // see below
+using std::atomic_compare_exchange_weak // see below
+using std::atomic_compare_exchange_weak_explicit // see below
+using std::atomic_fetch_add // see below
+using std::atomic_fetch_add_explicit // see below
+using std::atomic_fetch_sub // see below
+using std::atomic_fetch_sub_explicit // see below
+using std::atomic_fetch_or // see below
+using std::atomic_fetch_or_explicit // see below
+using std::atomic_fetch_and // see below
+using std::atomic_fetch_and_explicit // see below
+using std::atomic_flag_test_and_set // see below
+using std::atomic_flag_test_and_set_explicit // see below
+using std::atomic_flag_clear // see below
+using std::atomic_flag_clear_explicit // see below
+
+using std::atomic_thread_fence // see below
+using std::atomic_signal_fence // see below
+
+*/
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 20
+
+#include <atomic>
+#include <version>
+
+#ifdef _Atomic
+# undef _Atomic
+#endif
+
+#define _Atomic(_Tp) ::std::atomic<_Tp>
+
+using std::memory_order _LIBCPP_USING_IF_EXISTS;
+using std::memory_order_relaxed _LIBCPP_USING_IF_EXISTS;
+using std::memory_order_consume _LIBCPP_USING_IF_EXISTS;
+using std::memory_order_acquire _LIBCPP_USING_IF_EXISTS;
+using std::memory_order_release _LIBCPP_USING_IF_EXISTS;
+using std::memory_order_acq_rel _LIBCPP_USING_IF_EXISTS;
+using std::memory_order_seq_cst _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_flag _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_bool _LIBCPP_USING_IF_EXISTS;
+using std::atomic_char _LIBCPP_USING_IF_EXISTS;
+using std::atomic_schar _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uchar _LIBCPP_USING_IF_EXISTS;
+using std::atomic_short _LIBCPP_USING_IF_EXISTS;
+using std::atomic_ushort _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint _LIBCPP_USING_IF_EXISTS;
+using std::atomic_long _LIBCPP_USING_IF_EXISTS;
+using std::atomic_ulong _LIBCPP_USING_IF_EXISTS;
+using std::atomic_llong _LIBCPP_USING_IF_EXISTS;
+using std::atomic_ullong _LIBCPP_USING_IF_EXISTS;
+using std::atomic_char8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_char16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_char32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_wchar_t _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_int8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int64_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint64_t _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_int_least8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_least8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int_least16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_least16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int_least32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_least32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int_least64_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_least64_t _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_int_fast8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_fast8_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int_fast16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_fast16_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int_fast32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_fast32_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_int_fast64_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uint_fast64_t _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_intptr_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uintptr_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_size_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_ptrdiff_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_intmax_t _LIBCPP_USING_IF_EXISTS;
+using std::atomic_uintmax_t _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_compare_exchange_strong _LIBCPP_USING_IF_EXISTS;
+using std::atomic_compare_exchange_strong_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_compare_exchange_weak _LIBCPP_USING_IF_EXISTS;
+using std::atomic_compare_exchange_weak_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_exchange _LIBCPP_USING_IF_EXISTS;
+using std::atomic_exchange_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_add _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_add_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_and _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_and_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_or _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_or_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_sub _LIBCPP_USING_IF_EXISTS;
+using std::atomic_fetch_sub_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_flag_clear _LIBCPP_USING_IF_EXISTS;
+using std::atomic_flag_clear_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_flag_test_and_set _LIBCPP_USING_IF_EXISTS;
+using std::atomic_flag_test_and_set_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_is_lock_free _LIBCPP_USING_IF_EXISTS;
+using std::atomic_load _LIBCPP_USING_IF_EXISTS;
+using std::atomic_load_explicit _LIBCPP_USING_IF_EXISTS;
+using std::atomic_store _LIBCPP_USING_IF_EXISTS;
+using std::atomic_store_explicit _LIBCPP_USING_IF_EXISTS;
+
+using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS;
+using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS;
+
+#elif defined(_LIBCPP_COMPILER_CLANG_BASED)
+
+// Before C++23, we include the next <stdatomic.h> on the path to avoid hijacking
+// the header. We do this because Clang has historically shipped a <stdatomic.h>
+// header that would be available in all Standard modes, and we don't want to
+// break that use case.
+# if __has_include_next(<stdatomic.h>)
+# include_next <stdatomic.h>
+# endif
+
+#endif // _LIBCPP_STD_VER > 20
+
+#endif // _LIBCPP_STDATOMIC_H