summaryrefslogtreecommitdiff
path: root/absl/debugging
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-08-06 07:07:10 -0700
committerGravatar Derek Mauro <dmauro@google.com>2018-08-06 10:29:20 -0400
commitbea85b52733022294eef108a2e42d77b616ddca2 (patch)
treef8e5be141ecd84545551464956ca2bce6017198e /absl/debugging
parent8f96be6ca60d967bd4b37f93d0a03bcff4145200 (diff)
Export of internal Abseil changes.
-- 36d990031b4ae8e2debaccca63ff41829383a7d2 by Derek Mauro <dmauro@google.com>: Rename FailureSignalHandler to AbslFailureSignalHandler so that we don't confuse poor souls. PiperOrigin-RevId: 207539530 -- 0ced19ef8e0e0887f9809ffb88c5ef5f8746a6aa by Abseil Team <absl-team@google.com>: Minor changes to support WebAssembly. PiperOrigin-RevId: 207286743 GitOrigin-RevId: 36d990031b4ae8e2debaccca63ff41829383a7d2 Change-Id: I6b86713e96f5c32b595171594e456e38c898e601
Diffstat (limited to 'absl/debugging')
-rw-r--r--absl/debugging/failure_signal_handler.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
index 4c131fe0..d4b957bc 100644
--- a/absl/debugging/failure_signal_handler.cc
+++ b/absl/debugging/failure_signal_handler.cc
@@ -252,7 +252,7 @@ ABSL_ATTRIBUTE_NOINLINE static void WriteStackTrace(
depth, min_dropped_frames, symbolize_stacktrace, writerfn, writerfn_arg);
}
-// Called by FailureSignalHandler() to write the failure info. It is
+// Called by AbslFailureSignalHandler() to write the failure info. It is
// called once with writerfn set to WriteToStderr() and then possibly
// with writerfn set to the user provided function.
static void WriteFailureInfo(int signo, void* ucontext,
@@ -278,9 +278,9 @@ static void PortableSleepForSeconds(int seconds) {
}
#ifdef ABSL_HAVE_ALARM
-// FailureSignalHandler() installs this as a signal handler for
+// AbslFailureSignalHandler() installs this as a signal handler for
// SIGALRM, then sets an alarm to be delivered to the program after a
-// set amount of time. If FailureSignalHandler() hangs for more than
+// set amount of time. If AbslFailureSignalHandler() hangs for more than
// the alarm timeout, ImmediateAbortSignalHandler() will abort the
// program.
static void ImmediateAbortSignalHandler(int) {
@@ -294,11 +294,10 @@ using GetTidType = decltype(absl::base_internal::GetTID());
ABSL_CONST_INIT static std::atomic<GetTidType> failed_tid(0);
#ifndef ABSL_HAVE_SIGACTION
-static void FailureSignalHandler(int signo) {
+static void AbslFailureSignalHandler(int signo) {
void* ucontext = nullptr;
#else
-static void FailureSignalHandler(int signo, siginfo_t*,
- void* ucontext) {
+static void AbslFailureSignalHandler(int signo, siginfo_t*, void* ucontext) {
#endif
const GetTidType this_tid = absl::base_internal::GetTID();
@@ -308,10 +307,10 @@ static void FailureSignalHandler(int signo, siginfo_t*,
std::memory_order_acq_rel, std::memory_order_relaxed)) {
ABSL_RAW_LOG(
ERROR,
- "Signal %d raised at PC=%p while already in FailureSignalHandler()",
+ "Signal %d raised at PC=%p while already in AbslFailureSignalHandler()",
signo, absl::debugging_internal::GetProgramCounter(ucontext));
if (this_tid != previous_failed_tid) {
- // Another thread is already in FailureSignalHandler(), so wait
+ // Another thread is already in AbslFailureSignalHandler(), so wait
// a bit for it to finish. If the other thread doesn't kill us,
// we do so after sleeping.
PortableSleepForSeconds(3);
@@ -349,7 +348,7 @@ static void FailureSignalHandler(int signo, siginfo_t*,
void InstallFailureSignalHandler(const FailureSignalHandlerOptions& options) {
fsh_options = options;
for (auto& it : failure_signal_data) {
- InstallOneFailureHandler(&it, FailureSignalHandler);
+ InstallOneFailureHandler(&it, AbslFailureSignalHandler);
}
}