diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-09-16 16:59:58 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-09-23 18:12:59 +0000 |
commit | a413908dd064de6e3ea5b8d95d707a532bd3f4c8 (patch) | |
tree | ca1bb03a29fff2bb902aa015fe04fcd36988394d /src/runtime/signal_unix.go | |
parent | bc320fc1f5bc5d6019e3d8d62aa32eac3417bb7f (diff) | |
download | go-a413908dd064de6e3ea5b8d95d707a532bd3f4c8.tar.gz go-a413908dd064de6e3ea5b8d95d707a532bd3f4c8.zip |
all: add GOOS=ios
Introduce GOOS=ios for iOS systems. GOOS=ios matches "darwin"
build tag, like GOOS=android matches "linux" and GOOS=illumos
matches "solaris". Only ios/arm64 is supported (ios/amd64 is
not).
GOOS=ios and GOOS=darwin remain essentially the same at this
point. They will diverge at later time, to differentiate macOS
and iOS.
Uses of GOOS=="darwin" are changed to (GOOS=="darwin" || GOOS=="ios"),
except if it clearly means macOS (e.g. GOOS=="darwin" && GOARCH=="amd64"),
it remains GOOS=="darwin".
Updates #38485.
Change-Id: I4faacdc1008f42434599efb3c3ad90763a83b67c
Reviewed-on: https://go-review.googlesource.com/c/go/+/254740
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/signal_unix.go')
-rw-r--r-- | src/runtime/signal_unix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index bbfc18e37b..a3d6f34c88 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -346,7 +346,7 @@ const preemptMSupported = true // safe-point, it will preempt the goroutine. It always atomically // increments mp.preemptGen after handling a preemption request. func preemptM(mp *m) { - if GOOS == "darwin" && GOARCH == "arm64" && !iscgo { + if (GOOS == "darwin" || GOOS == "ios") && 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 // absent, we cannot save/restore G in TLS, and if a signal is @@ -975,7 +975,7 @@ func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool { // This function and its caller sigtrampgo assumes SIGPIPE is delivered on the // originating thread. This property does not hold on macOS (golang.org/issue/33384), // so we have no choice but to ignore SIGPIPE. - if GOOS == "darwin" && sig == _SIGPIPE { + if (GOOS == "darwin" || GOOS == "ios") && sig == _SIGPIPE { return true } |