Skip to content

Commit 71f95ec

Browse files
committed
[libc++] Move _LIBCPP_NO_THREAD_SAFETY_ANALYSIS to __config
This makes __threading_support contain nothing but the base threading API provided by the system. Differential Revision: https://reviews.llvm.org/D155458
1 parent d4a5470 commit 71f95ec

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libcxx/include/__config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,12 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
11371137
# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
11381138
# endif
11391139

1140+
# if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(__no_thread_safety_analysis__)
1141+
# define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((__no_thread_safety_analysis__))
1142+
# else
1143+
# define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
1144+
# endif
1145+
11401146
# if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS)
11411147
# if defined(__clang__) && __has_attribute(acquire_capability)
11421148
// Work around the attribute handling in clang. When both __declspec and

libcxx/include/__threading_support

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@
4242
#define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
4343
#endif
4444

45-
#if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(no_thread_safety_analysis)
46-
#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))
47-
#else
48-
#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
49-
#endif
50-
5145
typedef ::timespec __libcpp_timespec_t;
5246
#endif // !defined(_LIBCPP_HAS_NO_THREADS)
5347

0 commit comments

Comments
 (0)