]> Cypherpunks repositories - gostls13.git/commit
runtime: document non-obvious requirement on sudog.elem
authorAustin Clements <austin@google.com>
Mon, 15 Feb 2016 21:50:12 +0000 (16:50 -0500)
committerAustin Clements <austin@google.com>
Thu, 25 Feb 2016 23:37:17 +0000 (23:37 +0000)
commit1e91e2a25a0058cc25b3836b59a0954c6c75a62c
tree46ceeacaa14a26b6052078eff830e74b7e0176b5
parent39f2bd737bb0b9446b4d241aa76fcb87d7e77278
runtime: document non-obvious requirement on sudog.elem

The channel code must not allow stack splits between when it assigns a
potential stack pointer to sudog.elem (or sudog.selectdone) and when
it makes the sudog visible to copystack by putting it on the g.waiting
list. We do get this right everywhere, but add a comment about this
subtlety for future eyes.

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