Skip to content

Commit 4d89b32

Browse files
heisen-liaclements
authored andcommitted
runtime: remove remnants of signal stack workaround
Updates #35979 Change-Id: Ic3a6e1b5e9d544979a3c8d909a36a55efa3b9c9d Reviewed-on: https://go-review.googlesource.com/c/go/+/251757 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Austin Clements <[email protected]>
1 parent 5f5a556 commit 4d89b32

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/runtime/os_linux.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package runtime
66

77
import (
8-
"runtime/internal/atomic"
98
"runtime/internal/sys"
109
"unsafe"
1110
)
@@ -476,21 +475,7 @@ func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32
476475
func getpid() int
477476
func tgkill(tgid, tid, sig int)
478477

479-
// touchStackBeforeSignal stores an errno value. If non-zero, it means
480-
// that we should touch the signal stack before sending a signal.
481-
// This is used on systems that have a bug when the signal stack must
482-
// be faulted in. See #35777 and #37436.
483-
//
484-
// This is accessed atomically as it is set and read in different threads.
485-
//
486-
// TODO(austin): Remove this after Go 1.15 when we remove the
487-
// mlockGsignal workaround.
488-
var touchStackBeforeSignal uint32
489-
490478
// signalM sends a signal to mp.
491479
func signalM(mp *m, sig int) {
492-
if atomic.Load(&touchStackBeforeSignal) != 0 {
493-
atomic.Cas((*uint32)(unsafe.Pointer(mp.gsignal.stack.hi-4)), 0, 0)
494-
}
495480
tgkill(getpid(), int(mp.procid), sig)
496481
}

0 commit comments

Comments
 (0)