]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: improve sigsend documentation
authorAustin Clements <austin@google.com>
Thu, 30 Nov 2017 20:47:04 +0000 (15:47 -0500)
committerAustin Clements <austin@google.com>
Fri, 1 Dec 2017 20:34:13 +0000 (20:34 +0000)
I think of "sending" a signal as calling kill, but sigsend is involved
in handling a signal and, specifically delivering it to the internal
signal queue. The term "delivery" is already used in
signalWaitUntilIdle, so this CL also uses it in the documentation for
sigsend.

Change-Id: I86e171f247f525ece884a680bace616fa9a3c7bd
Reviewed-on: https://go-review.googlesource.com/81235
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sigqueue.go

index 94e2b69d92c41b40e2790bbbdfafec57ab9db75c..98331627eb46c2174ba7e42c2ad8f816c55b25c3 100644 (file)
@@ -61,8 +61,9 @@ const (
        sigSending
 )
 
-// Called from sighandler to send a signal back out of the signal handling thread.
-// Reports whether the signal was sent. If not, the caller typically crashes the program.
+// sigsend delivers a signal from sighandler to the internal signal delivery queue.
+// It reports whether the signal was sent. If not, the caller typically crashes the program.
+// It runs from the signal handler, so it's limited in what it can do.
 func sigsend(s uint32) bool {
        bit := uint32(1) << uint(s&31)
        if !sig.inuse || s >= uint32(32*len(sig.wanted)) {