runtime: clean up now unused pushCallSupported

All platforms now support pushCall, hence remove the now unnecessary
pushCallSupported flag/guard.

Change-Id: I99e4be73839da68a742f3c239bae9ce2f8764624
Reviewed-on: https://go-review.googlesource.com/c/go/+/228497
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Joel Sing 2020-04-16 15:33:53 +10:00
parent 2a029b3f26
commit 4eaf855155
10 changed files with 1 additions and 25 deletions

View file

@ -336,7 +336,7 @@ func doSigPreempt(gp *g, ctxt *sigctxt) {
atomic.Store(&gp.m.signalPending, 0)
}
const preemptMSupported = pushCallSupported
const preemptMSupported = true
// preemptM sends a preemption request to mp. This request may be
// handled asynchronously and may be coalesced with other requests to
@ -345,11 +345,6 @@ const preemptMSupported = pushCallSupported
// safe-point, it will preempt the goroutine. It always atomically
// increments mp.preemptGen after handling a preemption request.
func preemptM(mp *m) {
if !pushCallSupported {
// This architecture doesn't support ctxt.pushCall
// yet, so doSigPreempt won't work.
return
}
if GOOS == "darwin" && GOARCH == "arm64" && !iscgo {
// On darwin, we use libc calls, and cgo is required on ARM64
// so we have TLS set up to save/restore G during C calls. If cgo is