]> Cypherpunks repositories - gostls13.git/commit
runtime: clean up canpanic
authorMichael Pratt <mpratt@google.com>
Wed, 20 Jul 2022 15:09:14 +0000 (11:09 -0400)
committerMichael Pratt <mpratt@google.com>
Tue, 2 Aug 2022 18:50:55 +0000 (18:50 +0000)
commit7e952962dff6aafb9ed888a86a7208f01fbe9508
tree839d6f682c0472250da1dbe12fe39ae7b1b5b363
parent9dbc0f3556b3401b0f3339d4c33cd32ea16d5241
runtime: clean up canpanic

* The gp argument to canpanic is always equivalent to getg(), so no need
to pass it at all.
* gp must not be nil or _g_.m would have crashed, so no need to check
for nil.
* Use acquirem to better reason about preemption.

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