From f8e4b2fc7a68ee22cd270fda57c5327faeef2076 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Wed, 7 Jun 2017 12:39:12 -0500 Subject: [PATCH] Fixing a name of a configuration constant --- CMakeLists.txt | 4 +--- src/hpx_init.cpp | 5 +++-- src/runtime/threads/coroutines/detail/coroutine_impl.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9af96723c80..3b13f6bf6d48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -384,9 +384,8 @@ hpx_option(HPX_WITH_DISABLED_SIGNAL_EXCEPTION_HANDLERS BOOL "Disables the mechanism that produces debug output for caught signals and unhandled exceptions (default: OFF)" OFF ADVANCED) - if(HPX_WITH_DISABLED_SIGNAL_EXCEPTION_HANDLERS) - add_definitions(-DHPX_WITH_DISABLED_SIGNAL_EXCEPTION_HANDLERS) + hpx_add_config_define(HPX_HAVE_DISABLED_SIGNAL_EXCEPTION_HANDLERS) endif() ## Thread Manager related build options @@ -548,7 +547,6 @@ if(HPX_WITH_GOOGLE_PERFTOOLS) hpx_add_config_define(HPX_HAVE_GOOGLE_PERFTOOLS) endif() - hpx_option(HPX_WITH_ITTNOTIFY BOOL "Enable Amplifier (ITT) instrumentation support." OFF CATEGORY "Profiling") diff --git a/src/hpx_init.cpp b/src/hpx_init.cpp index 0c9919f40ed1..9ff1f49d73c9 100644 --- a/src/hpx_init.cpp +++ b/src/hpx_init.cpp @@ -1107,8 +1107,7 @@ namespace hpx shutdown_function_type shutdown, hpx::runtime_mode mode, bool blocking) { - int result = 0; -#ifndef HPX_WITH_DISABLED_SIGNAL_EXCEPTION_HANDLERS +#if !defined(HPX_HAVE_DISABLED_SIGNAL_EXCEPTION_HANDLERS) set_error_handlers(); #endif @@ -1128,6 +1127,8 @@ namespace hpx unsetenv("LC_IDENTIFICATION"); unsetenv("LC_ALL"); #endif + + int result = 0; try { // make sure the runtime system is not active yet if (get_runtime_ptr() != nullptr) diff --git a/src/runtime/threads/coroutines/detail/coroutine_impl.cpp b/src/runtime/threads/coroutines/detail/coroutine_impl.cpp index f697289617c6..fe4ff8551d23 100644 --- a/src/runtime/threads/coroutines/detail/coroutine_impl.cpp +++ b/src/runtime/threads/coroutines/detail/coroutine_impl.cpp @@ -108,21 +108,21 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail tinfo = boost::current_exception(); this->reset(); // reset functor } -#ifndef HPX_WITH_DISABLED_SIGNAL_EXCEPTION_HANDLERS catch (boost::exception const&) { status = super_type::ctx_exited_abnormally; tinfo = boost::current_exception(); this->reset(); - } catch (std::exception const&) { + } + catch (std::exception const&) { status = super_type::ctx_exited_abnormally; tinfo = boost::current_exception(); this->reset(); - } catch (...) { + } + catch (...) { status = super_type::ctx_exited_abnormally; tinfo = boost::current_exception(); this->reset(); } -#endif this->do_return(status, std::move(tinfo));