]> Cypherpunks repositories - gostls13.git/commit
runtime: improve comment about non-preemption during GC work
authorAustin Clements <austin@google.com>
Fri, 20 Mar 2015 17:34:03 +0000 (13:34 -0400)
committerAustin Clements <austin@google.com>
Tue, 31 Mar 2015 01:05:38 +0000 (01:05 +0000)
commita2f3d73fee16ee2a4662593f3bcdd1cdb99a7961
treea512b1712a3316fc541b728248bdf859da2ce2a6
parenta4374c1de1d4fd924a11e055ca55efde11b258da
runtime: improve comment about non-preemption during GC work

Currently, gcDrainN is documented saying that it must be run on the
system stack. In fact, the problem and solution here are somewhat
subtler. First, it doesn't have to happen on the system stack, it just
has to be non-stoppable (that is, non-preemptible). Second, this isn't
specific to gcDrainN (though gcDrainN is perhaps the most surprising
instance); it's general to anything that uses the gcWork structure.

Move the comment to gcWork and generalize it.

Change-Id: I5277b5abb070e47f8d783bc15a310b379c6adc22
Reviewed-on: https://go-review.googlesource.com/8247
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go
src/runtime/mgcwork.go