Source File
sigqueue.go
Belonging Package
runtime
package runtime
import (
_ // for go:linkname
)
break
case sigReceiving:
if atomic.Cas(&sig.state, sigReceiving, sigIdle) {
if GOOS == "darwin" || GOOS == "ios" {
sigNoteWakeup(&sig.note)
break
}
notewakeup(&sig.note)
break
}
func () {
if atomic.Cas(&sig.state, sigReceiving, sigFixup) {
notewakeup(&sig.note)
}
}
func () uint32 {
:
for {
switch atomic.Load(&sig.state) {
default:
throw("signal_recv: inconsistent state")
case sigIdle:
if atomic.Cas(&sig.state, sigIdle, sigReceiving) {
if GOOS == "darwin" || GOOS == "ios" {
sigNoteSleep(&sig.note)
break
}
notetsleepg(&sig.note, -1)
noteclear(&sig.note)
if !atomic.Cas(&sig.state, sigFixup, sigIdle) {
break
}
case sigSending:
if atomic.Cas(&sig.state, sigSending, sigIdle) {
break
}
}
}
for atomic.Load(&sig.delivering) != 0 {
Gosched()
}
func ( uint32) {
sig.inuse = true // enable reception of signals; cannot disable
if GOOS == "darwin" || GOOS == "ios" {
sigNoteSetup(&sig.note)
} else {
noteclear(&sig.note)
}
}
if >= uint32(len(sig.wanted)*32) {
return
}
:= sig.wanted[/32]
|= 1 << ( & 31)
atomic.Store(&sig.wanted[/32], )
:= sig.ignored[/32]
&^= 1 << ( & 31)
atomic.Store(&sig.ignored[/32], )
sigenable()
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |