diff options
Diffstat (limited to 'libgo/go/runtime/signal_sighandler.go')
-rw-r--r-- | libgo/go/runtime/signal_sighandler.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libgo/go/runtime/signal_sighandler.go b/libgo/go/runtime/signal_sighandler.go index 766bb7dc0fb..a057df9018a 100644 --- a/libgo/go/runtime/signal_sighandler.go +++ b/libgo/go/runtime/signal_sighandler.go @@ -25,7 +25,7 @@ var crashing int32 // are not allowed. // //go:nowritebarrierrec -func sighandler(sig uint32, info *_siginfo_t, ctxt unsafe.Pointer, gp *g) { +func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) { _g_ := getg() c := sigctxt{info, ctxt} @@ -71,7 +71,7 @@ func sighandler(sig uint32, info *_siginfo_t, ctxt unsafe.Pointer, gp *g) { } if flags&_SigKill != 0 { - dieFromSignal(int32(sig)) + dieFromSignal(sig) } if flags&_SigThrow == 0 { @@ -91,10 +91,7 @@ func sighandler(sig uint32, info *_siginfo_t, ctxt unsafe.Pointer, gp *g) { print("Signal ", sig, "\n") } - if sigpc != 0 { - print("PC=", hex(sigpc), " ") - } - print("m=", _g_.m.id, " sigcode=", c.sigcode(), "\n") + print("PC=", hex(sigpc), " m=", _g_.m.id, " sigcode=", c.sigcode(), "\n") if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 { print("signal arrived during cgo execution\n") gp = _g_.m.lockedg @@ -114,7 +111,7 @@ func sighandler(sig uint32, info *_siginfo_t, ctxt unsafe.Pointer, gp *g) { if docrash { crashing++ - if crashing < mcount() { + if crashing < sched.mcount { // There are other m's that need to dump their stacks. // Relay SIGQUIT to the next m by sending it to the current process. // All m's that have already received SIGQUIT have signal masks blocking |