aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/c++config
diff options
context:
space:
mode:
authorTorvald Riegel <triegel@redhat.com>2016-01-15 22:42:41 +0000
committerTorvald Riegel <triegel@redhat.com>2016-01-15 22:42:41 +0000
commitc02dbc7eb70cae07fd0f059aa2fc7125db8018a9 (patch)
tree2a0e76101e1e20d6aaa161901261dee89f905afb /libstdc++-v3/include/bits/c++config
parent31c82ae12f3602383c2d1b7153b4babd0ffc8d04 (diff)
libstdc++: Make certain exceptions transaction_safe.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@232454 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/c++config')
-rw-r--r--libstdc++-v3/include/bits/c++config16
1 files changed, 16 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 6b13f5c6251..387a7bb57fe 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -481,6 +481,22 @@ namespace std
# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
# define _GLIBCXX_END_EXTERN_C }
+#define _GLIBCXX_USE_ALLOCATOR_NEW
+
+// Conditionally enable annotations for the Transactional Memory TS on C++11.
+// Most of the following conditions are due to limitations in the current
+// implementation.
+#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \
+ && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \
+ && !_GLIBCXX_FULLY_DYNAMIC_STRING && __GXX_WEAK__ \
+ && _GLIBCXX_USE_ALLOCATOR_NEW
+#define _GLIBCXX_TXN_SAFE transaction_safe
+#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic
+#else
+#define _GLIBCXX_TXN_SAFE
+#define _GLIBCXX_TXN_SAFE_DYN
+#endif
+
#else // !__cplusplus
# define _GLIBCXX_BEGIN_EXTERN_C
# define _GLIBCXX_END_EXTERN_C