aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libcxxabi/src/cxa_handlers.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib/libcxxabi/src/cxa_handlers.hpp')
-rw-r--r--system/lib/libcxxabi/src/cxa_handlers.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/system/lib/libcxxabi/src/cxa_handlers.hpp b/system/lib/libcxxabi/src/cxa_handlers.hpp
index a7f582c0..64994ac7 100644
--- a/system/lib/libcxxabi/src/cxa_handlers.hpp
+++ b/system/lib/libcxxabi/src/cxa_handlers.hpp
@@ -10,6 +10,9 @@
// unexpected_handler, and new_handler.
//===----------------------------------------------------------------------===//
+#ifndef _CXA_HANDLERS_H
+#define _CXA_HANDLERS_H
+
#include <exception>
namespace std
@@ -24,3 +27,28 @@ void
__terminate(terminate_handler func) _NOEXCEPT;
} // std
+
+extern "C"
+{
+
+extern void (*__cxa_terminate_handler)();
+extern void (*__cxa_unexpected_handler)();
+extern void (*__cxa_new_handler)();
+
+/*
+
+ At some point in the future these three symbols will become
+ C++11 atomic variables:
+
+ extern std::atomic<std::terminate_handler> __cxa_terminate_handler;
+ extern std::atomic<std::unexpected_handler> __cxa_unexpected_handler;
+ extern std::atomic<std::new_handler> __cxa_new_handler;
+
+ This change will not impact their ABI. But it will allow for a
+ portible performance optimization.
+
+*/
+
+} // extern "C"
+
+#endif // _CXA_HANDLERS_H