From a413908dd064de6e3ea5b8d95d707a532bd3f4c8 Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Wed, 16 Sep 2020 16:59:58 -0400 Subject: 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 Run-TryBot: Cherry Zhang TryBot-Result: Go Bot Reviewed-by: Austin Clements --- src/runtime/sigqueue.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime/sigqueue.go') diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go index 3bf07cb5a6..0605f5da80 100644 --- a/src/runtime/sigqueue.go +++ b/src/runtime/sigqueue.go @@ -105,7 +105,7 @@ Send: break Send case sigReceiving: if atomic.Cas(&sig.state, sigReceiving, sigIdle) { - if GOOS == "darwin" { + if GOOS == "darwin" || GOOS == "ios" { sigNoteWakeup(&sig.note) break Send } @@ -140,7 +140,7 @@ func signal_recv() uint32 { throw("signal_recv: inconsistent state") case sigIdle: if atomic.Cas(&sig.state, sigIdle, sigReceiving) { - if GOOS == "darwin" { + if GOOS == "darwin" || GOOS == "ios" { sigNoteSleep(&sig.note) break Receive } @@ -194,7 +194,7 @@ func signal_enable(s uint32) { if !sig.inuse { // This is the first call to signal_enable. Initialize. sig.inuse = true // enable reception of signals; cannot disable - if GOOS == "darwin" { + if GOOS == "darwin" || GOOS == "ios" { sigNoteSetup(&sig.note) } else { noteclear(&sig.note) -- cgit v1.3