]> Cypherpunks repositories - gostls13.git/commit
runtime: tricky replacements of _g_ in signal_unix.go
authorMichael Pratt <mpratt@google.com>
Thu, 11 Feb 2021 16:19:59 +0000 (11:19 -0500)
committerMichael Pratt <mpratt@google.com>
Tue, 2 Aug 2022 18:51:27 +0000 (18:51 +0000)
commit8666d89ca85fb0be4e41917dee31ad487e0f4ee6
treebc16db345035fbe484e253ec062f590f1045785d
parent74cee276fe59013d042658f54c7340befa3ecad6
runtime: tricky replacements of _g_ in signal_unix.go

sighandler has gp, the goroutine running when the signal arrived, and
gsignal, the goroutine executing the signal handler. The latter is
usually mp.gsignal, except in the case noted by the delayedSignal check.

Like previous CLs, cases where the getg() G is used only to access the M
are replaced with direct uses of mp.

Change-Id: I2dc7894da7004af17682712e07a0be5f9a235d81
Reviewed-on: https://go-review.googlesource.com/c/go/+/418580
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
src/runtime/signal_unix.go