]> Cypherpunks repositories - gostls13.git/commit
runtime: consolidate "out of GC work" checks
authorAustin Clements <austin@google.com>
Mon, 19 Oct 2015 17:35:25 +0000 (13:35 -0400)
committerAustin Clements <austin@google.com>
Fri, 30 Oct 2015 22:46:22 +0000 (22:46 +0000)
commit4cca1cc05eae81b933d2aa703b71780a150d715a
tree7a40163593d65da0cb2e479b33e37dd28ee4a9f0
parent7c167f270826039590af43360b9fb9b2890fe13d
runtime: consolidate "out of GC work" checks

We already have gcMarkWorkAvailable, but the check for GC mark work is
open-coded in several places. Generalize gcMarkWorkAvailable slightly
and replace these open-coded checks with calls to gcMarkWorkAvailable.

In addition to cleaning up the code, this puts us in a better position
to make this check slightly more complicated.

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