mirror of
https://github.com/golang/go
synced 2024-11-19 03:14:42 -07:00
392336f94e
handoffp by definition runs without a P, so it's not allowed to have write barriers. It doesn't have any right now, but mark it nowritebarrier to disallow any creeping in in the future. handoffp in turns calls startm, newm, and newosproc, all of which are "below Go" and make sense to run without a P, so disallow write barriers in these as well. For most functions, we've done this because they may race with stoptheworld() and hence must not have write barriers. For these functions, it's a little different: the world can't stop while we're in handoffp, so this race isn't present. But we implement this restriction with a somewhat broader rule that you can't have a write barrier without a P. We like this rule because it's simple and means that our write barriers can depend on there being a P, even though this rule is actually a little broader than necessary. Hence, even though there's no danger of the race in these functions, we want to adhere to the broader rule. Change-Id: Ie22319c30eea37d703eb52f5c7ca5da872030b88 Reviewed-on: https://go-review.googlesource.com/8130 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org> |
||
---|---|---|
.. | ||
archive | ||
bufio | ||
builtin | ||
bytes | ||
cmd | ||
compress | ||
container | ||
crypto | ||
database/sql | ||
debug | ||
encoding | ||
errors | ||
expvar | ||
flag | ||
fmt | ||
go | ||
hash | ||
html | ||
image | ||
index/suffixarray | ||
internal | ||
io | ||
log | ||
math | ||
mime | ||
net | ||
os | ||
path | ||
reflect | ||
regexp | ||
runtime | ||
sort | ||
strconv | ||
strings | ||
sync | ||
syscall | ||
testing | ||
text | ||
time | ||
unicode | ||
unsafe | ||
all.bash | ||
all.bat | ||
all.rc | ||
androidtest.bash | ||
bootstrap.bash | ||
clean.bash | ||
clean.bat | ||
clean.rc | ||
make.bash | ||
make.bat | ||
Make.dist | ||
make.rc | ||
nacltest.bash | ||
race.bash | ||
race.bat | ||
run.bash | ||
run.bat | ||
run.rc |