]> Cypherpunks repositories - gostls13.git/commit
runtime: fix transient _Gwaiting states in newstack
authorAustin Clements <austin@google.com>
Thu, 25 Feb 2016 20:37:40 +0000 (15:37 -0500)
committerAustin Clements <austin@google.com>
Wed, 16 Mar 2016 20:13:12 +0000 (20:13 +0000)
commit3c2a21ff13c53b93db50cfb37b186d6200e2ceec
tree06c5bebcfadafccc6bd7ba3a3ac69c3f1737b4f4
parent8fb182d0203c90ca04a04d83d37a24960012a3cc
runtime: fix transient _Gwaiting states in newstack

With concurrent stack shrinking, the stack can move the instant after
a G enters _Gwaiting. There are only two places that put a G into
_Gwaiting: gopark and newstack. We fixed uses of gopark. This commit
fixes newstack by simplifying its G transitions and, in particular,
eliminating or narrowing the transient _Gwaiting states it passes
through so it's clear nothing in the G is accessed while in _Gwaiting.

For #12967.

Change-Id: I2440ead411d2bc61beb1e2ab020ebe3cb3481af9
Reviewed-on: https://go-review.googlesource.com/20039
Reviewed-by: Rick Hudson <rlh@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/stack.go