diff options
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/sigqueue.go | 4 | ||||
| -rw-r--r-- | src/runtime/sigqueue_plan9.go | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go index e6e1a84063..f28067f3f9 100644 --- a/src/runtime/sigqueue.go +++ b/src/runtime/sigqueue.go @@ -90,6 +90,7 @@ Send: // Called to receive the next queued signal. // Must only be called from a single goroutine at a time. +//go:linkname signal_recv os/signal.signal_recv func signal_recv() uint32 { for { // Serve any signals from local copy. @@ -127,6 +128,7 @@ func signal_recv() uint32 { } // Must only be called from a single goroutine at a time. +//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 @@ -145,6 +147,7 @@ func signal_enable(s uint32) { } // Must only be called from a single goroutine at a time. +//go:linkname signal_disable os/signal.signal_disable func signal_disable(s uint32) { if s >= uint32(len(sig.wanted)*32) { return @@ -154,6 +157,7 @@ func signal_disable(s uint32) { } // Must only be called from a single goroutine at a time. +//go:linkname signal_ignore os/signal.signal_ignore func signal_ignore(s uint32) { if s >= uint32(len(sig.wanted)*32) { return diff --git a/src/runtime/sigqueue_plan9.go b/src/runtime/sigqueue_plan9.go index f000fabd1a..89f96be2e9 100644 --- a/src/runtime/sigqueue_plan9.go +++ b/src/runtime/sigqueue_plan9.go @@ -6,6 +6,8 @@ package runtime +import _ "unsafe" + const qsize = 64 var sig struct { @@ -92,6 +94,7 @@ func sendNote(s *byte) bool { // Called to receive the next queued signal. // Must only be called from a single goroutine at a time. +//go:linkname signal_recv os/signal.signal_recv func signal_recv() string { for { note := sig.q.pop() @@ -108,6 +111,7 @@ func signal_recv() string { } // Must only be called from a single goroutine at a time. +//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 @@ -120,9 +124,11 @@ func signal_enable(s uint32) { } // Must only be called from a single goroutine at a time. +//go:linkname signal_disable os/signal.signal_disable func signal_disable(s uint32) { } // Must only be called from a single goroutine at a time. +//go:linkname signal_ignore os/signal.signal_ignore func signal_ignore(s uint32) { } |
