//===------------------------- cxa_handlers.cpp ---------------------------===//1//2// The LLVM Compiler Infrastructure3//4// This file is dual licensed under the MIT and the University of Illinois Open5// Source Licenses. See LICENSE.TXT for details.6//7//8// This file implements the functionality associated with the terminate_handler,9// unexpected_handler, and new_handler.10//===----------------------------------------------------------------------===//1112#ifndef _CXA_HANDLERS_H13#define _CXA_HANDLERS_H1415#include <__cxxabi_config.h>1617#include <exception>1819namespace std20{2122_LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN23void24__unexpected(unexpected_handler func);2526_LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN27void28__terminate(terminate_handler func) _NOEXCEPT;2930} // std3132extern "C"33{3435_LIBCXXABI_DATA_VIS extern void (*__cxa_terminate_handler)();36_LIBCXXABI_DATA_VIS extern void (*__cxa_unexpected_handler)();37_LIBCXXABI_DATA_VIS extern void (*__cxa_new_handler)();3839/*4041At some point in the future these three symbols will become42C++11 atomic variables:4344extern std::atomic<std::terminate_handler> __cxa_terminate_handler;45extern std::atomic<std::unexpected_handler> __cxa_unexpected_handler;46extern std::atomic<std::new_handler> __cxa_new_handler;4748This change will not impact their ABI. But it will allow for a49portable performance optimization.5051*/5253} // extern "C"5455#endif // _CXA_HANDLERS_H565758