mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os/signal, runtime: remove runtime sigqueue initialization
We can initialize the runtime sigqueue packages on first use. We don't require an explicit initialization step. So, remove it. Change-Id: I484e02dc2c67395fd5584f35ecda2e28b37168df Reviewed-on: https://go-review.googlesource.com/c/go/+/226540 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
620208790e
commit
2681efaf0e
5 changed files with 13 additions and 21 deletions
|
|
@ -192,16 +192,13 @@ func signalWaitUntilIdle() {
|
|||
//go:linkname signal_enable os/signal.signal_enable
|
||||
func signal_enable(s uint32) {
|
||||
if !sig.inuse {
|
||||
// The first call to signal_enable is for us
|
||||
// to use for initialization. It does not pass
|
||||
// signal information in m.
|
||||
// This is the first call to signal_enable. Initialize.
|
||||
sig.inuse = true // enable reception of signals; cannot disable
|
||||
if GOOS == "darwin" {
|
||||
sigNoteSetup(&sig.note)
|
||||
return
|
||||
} else {
|
||||
noteclear(&sig.note)
|
||||
}
|
||||
noteclear(&sig.note)
|
||||
return
|
||||
}
|
||||
|
||||
if s >= uint32(len(sig.wanted)*32) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue