diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-03-19 16:56:51 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-03-19 16:56:51 +0000 |
commit | 4cfb63f07516ceff10be81c7dfac6c18122df782 (patch) | |
tree | e766292fd63635abae6587f793bb0189e0497523 /src/cxa_handlers.hpp | |
parent | 0f80bb79c0181c706cf6acce44f854e96ecaf755 (diff) |
I would really like to write the handlers in terms of C++11 atomics. This would give us the best performance, portablity, and safety tradeoff. Unfortunately I can not yet do that. So I've put the desired code in comments, and reverted the handler getters to the slower but safer legacy atomic intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@153041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_handlers.hpp')
-rw-r--r-- | src/cxa_handlers.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cxa_handlers.hpp b/src/cxa_handlers.hpp index 95a320d..64994ac 100644 --- a/src/cxa_handlers.hpp +++ b/src/cxa_handlers.hpp @@ -35,6 +35,20 @@ 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 |