]> Cypherpunks repositories - gostls13.git/commit
runtime: make "write barriers are not allowed" comments more precise
authorAustin Clements <austin@google.com>
Sun, 29 Mar 2015 14:20:54 +0000 (10:20 -0400)
committerAustin Clements <austin@google.com>
Mon, 30 Mar 2015 15:13:53 +0000 (15:13 +0000)
commit9e6f7aac28a33f805692e2c1b498fdbc576f853d
tree8276e68acc3e785810adb63ae55f6afab1cb8e9a
parentfa3ad1ebb582b96d1eda471c68ea250561db28b1
runtime: make "write barriers are not allowed" comments more precise

Currently, various functions are marked with the comment

  // May run without a P, so write barriers are not allowed.

However, "running without a P" is ambiguous. We intended these to mean
that m.p may be nil (which is the condition checked by the write
barrier). The comment could also be taken to mean that a
stop-the-world may happen, which is not the case for these functions
because they run in situations where there is in fact a function on
the stack holding a P locally, it just isn't in m.p.

Change these comments to state precisely what we mean, that m.p may be
nil.

Change-Id: I4a4a1d26aebd455e5067540e13b9f96a7482146c
Reviewed-on: https://go-review.googlesource.com/8209
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/os1_darwin.go
src/runtime/os1_dragonfly.go
src/runtime/os1_freebsd.go
src/runtime/os1_linux.go
src/runtime/os1_nacl.go
src/runtime/os1_netbsd.go
src/runtime/os1_openbsd.go
src/runtime/os1_plan9.go
src/runtime/os1_windows.go
src/runtime/os3_solaris.go
src/runtime/proc1.go