]> Cypherpunks repositories - gostls13.git/commit
testing: read coverage counters atomically
authorRob Pike <r@golang.org>
Tue, 9 Sep 2014 19:31:07 +0000 (12:31 -0700)
committerRob Pike <r@golang.org>
Tue, 9 Sep 2014 19:31:07 +0000 (12:31 -0700)
commitd33ee0c5e52cbdc66066f54b9b2e2c930268784a
treed8d4b803111fffa520e8e24d1a930cdbd8935c58
parenteafa4fff5257ed286618d9027eeaf3cce7c6b8d0
testing: read coverage counters atomically
For -mode=atomic, we need to read the counters
using an atomic load to avoid a race. Not worth worrying
about when -mode=atomic is set during generation
of the profile, so we use atomic loads always.

Fixes #8630.

LGTM=rsc
R=dvyukov, rsc
CC=golang-codereviews
https://golang.org/cl/141800043
src/testing/cover.go