summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-05-31 13:38:46 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-05-31 13:38:46 +0000
commit6809ad0faf60bed39aa35f44e59a53c2398a8332 (patch)
tree80b8c90b676ffd433a520a997703be4d3ea3fddf /vespalib
parent4b976b7218be5f9c05e4ea3d6254ef346ef23a84 (diff)
Simplify to just use seq_cst instead of rel/acq for signal handler completion
Matches the use of seq_cst for the rest of the stack dumping logic.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/util/signalhandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/vespalib/src/vespa/vespalib/util/signalhandler.cpp b/vespalib/src/vespa/vespalib/util/signalhandler.cpp
index ac92cbd08b4..c4d61738324 100644
--- a/vespalib/src/vespa/vespalib/util/signalhandler.cpp
+++ b/vespalib/src/vespa/vespalib/util/signalhandler.cpp
@@ -96,7 +96,7 @@ SignalHandler::dump_current_thread_stack_to_shared_state() noexcept
// Note: safe_dump_to() takes in buffer size in _bytes_, not in number of frames.
const auto n_frames = boost::stacktrace::safe_dump_to(frames_buf.data(), frames_buf.size() * sizeof(void*));
_shared_backtrace_data._n_dumped_frames = static_cast<uint32_t>(n_frames);
- _shared_backtrace_data._signal_handler_done.store(true, std::memory_order_release);
+ _shared_backtrace_data._signal_handler_done.store(true);
}
SignalHandler::SignalHandler(int signal)
@@ -204,7 +204,7 @@ SignalHandler::get_cross_thread_stack_trace(pthread_t thread_id)
_shared_backtrace_data._want_backtrace.store(false);
return "(pthread_kill() failed; could not get backtrace)";
}
- while (!_shared_backtrace_data._signal_handler_done.load(std::memory_order_acquire)) {
+ while (!_shared_backtrace_data._signal_handler_done.load()) {
std::this_thread::sleep_for(1ms); // TODO yield instead?
}
constexpr int frames_to_skip = 4; // handleSignal() -> gotSignal() -> dump_current_thread_...() -> backtrace()