aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_linux.go
diff options
context:
space:
mode:
authorHeisenberg <lziqiang1@gmail.com>2020-08-31 19:22:36 +0800
committerAustin Clements <austin@google.com>2020-09-01 13:23:55 +0000
commit4d89b3231d590284e35bff647e597e93fdf41dae (patch)
treefd732bdb52aba359f9073f426ed9cb6db4675744 /src/runtime/os_linux.go
parent5f5a55679c54784d07643099b55228b6f88c0bdf (diff)
downloadgo-4d89b3231d590284e35bff647e597e93fdf41dae.tar.xz
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 <khr@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/os_linux.go')
-rw-r--r--src/runtime/os_linux.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go
index 9702920bcf..371db73502 100644
--- a/src/runtime/os_linux.go
+++ b/src/runtime/os_linux.go
@@ -5,7 +5,6 @@
package runtime
import (
- "runtime/internal/atomic"
"runtime/internal/sys"
"unsafe"
)
@@ -476,21 +475,7 @@ func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32
func getpid() int
func tgkill(tgid, tid, sig int)
-// touchStackBeforeSignal stores an errno value. If non-zero, it means
-// that we should touch the signal stack before sending a signal.
-// This is used on systems that have a bug when the signal stack must
-// be faulted in. See #35777 and #37436.
-//
-// This is accessed atomically as it is set and read in different threads.
-//
-// TODO(austin): Remove this after Go 1.15 when we remove the
-// mlockGsignal workaround.
-var touchStackBeforeSignal uint32
-
// signalM sends a signal to mp.
func signalM(mp *m, sig int) {
- if atomic.Load(&touchStackBeforeSignal) != 0 {
- atomic.Cas((*uint32)(unsafe.Pointer(mp.gsignal.stack.hi-4)), 0, 0)
- }
tgkill(getpid(), int(mp.procid), sig)
}