]> Cypherpunks repositories - gostls13.git/commit
runtime: ensure _Grunning Gs have a valid g.m and g.m.p
authorAustin Clements <austin@google.com>
Tue, 16 Apr 2019 01:46:43 +0000 (21:46 -0400)
committerAustin Clements <austin@google.com>
Fri, 25 Oct 2019 16:59:39 +0000 (16:59 +0000)
commitfc8eb264bba88b9e4eb85fa7560817abb25767f4
tree476b7857c584dc2d1da59a5d84670410b49aa14b
parentf82956b85bf7087b79b006018829423166b12afc
runtime: ensure _Grunning Gs have a valid g.m and g.m.p

We already claim on the documentation for _Grunning that this is case,
but execute transitions to _Grunning before assigning g.m. Fix this
and make the documentation even more explicit.

For #10958, #24543, but also a good cleanup.

Change-Id: I1eb0108e7762f55cfb0282aca624af1c0a15fe56
Reviewed-on: https://go-review.googlesource.com/c/go/+/201440
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/proc.go
src/runtime/runtime2.go