1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:14:42 -07:00
go/src
Austin Clements 392336f94e runtime: disallow write barriers in handoffp and callees
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>
2015-03-26 20:38:59 +00:00
..
archive all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
bufio bufio: fix incorrect comment on Scanner.Scan 2015-03-18 00:59:49 +00:00
builtin
bytes runtime: add runtime.cmpstring and bytes.Compare 2015-03-25 22:46:39 +00:00
cmd cmd/go: add $DOLLAR to the predefined variables for go generate 2015-03-26 00:18:51 +00:00
compress
container
crypto crypto/tls: Correct minimum version in comment 2015-03-25 12:53:36 +00:00
database/sql
debug debug/dwarf, encoding/asn1, go/ast: fix old comments 2015-03-24 00:09:30 +00:00
encoding debug/dwarf, encoding/asn1, go/ast: fix old comments 2015-03-24 00:09:30 +00:00
errors
expvar
flag all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
fmt fmt: document existing behavior of nil receivers 2015-03-01 18:17:53 +00:00
go debug/dwarf, encoding/asn1, go/ast: fix old comments 2015-03-24 00:09:30 +00:00
hash os/signal, hash/crc32: add arm64 build tags 2015-03-16 18:46:43 +00:00
html html/template: fix crash when escaping incomplete template 2015-03-20 19:57:45 +00:00
image image/internal/imageutil: inline the color.YCbCrToRGB calls. 2015-03-25 21:01:57 +00:00
index/suffixarray
internal runtime: remove futile wakeups from trace 2015-03-17 14:14:55 +00:00
io
log log/syslog: avoid unix sockets on darwin/arm 2015-03-04 22:13:06 +00:00
math math/big: fix known bug in Float.Float64 2015-03-24 20:34:14 +00:00
mime mime/quotedprintable: accept badly encoded bytes 2015-03-24 22:35:58 +00:00
net net/internal/socktest: new package 2015-03-25 00:13:46 +00:00
os os/exec: post-process lsof output on Android. 2015-03-25 00:34:37 +00:00
path all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
reflect all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
regexp regexp: fix link to RE2 syntax 2015-03-23 19:17:52 +00:00
runtime runtime: disallow write barriers in handoffp and callees 2015-03-26 20:38:59 +00:00
sort
strconv all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
strings bytes, os/exec, strings: fix a few BUG comments 2015-03-20 18:34:39 +00:00
sync sync/atomic: add support for GOARCH=arm64 2015-03-16 18:46:18 +00:00
syscall syscall: change Dup,Dup2,Dup3 to use Syscall, not RawSyscall 2015-03-26 17:29:08 +00:00
testing testing: document that flag.Parse is not called when TestMain runs 2015-03-20 04:40:08 +00:00
text html/template: fix crash when escaping incomplete template 2015-03-20 19:57:45 +00:00
time time: add a thorough example for time.Format 2015-03-26 18:44:42 +00:00
unicode all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00
unsafe
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash build: add bootstrap.bash for bootstrapping new systems 2015-03-02 17:51:56 +00:00
clean.bash
clean.bat
clean.rc
make.bash
make.bat build: update Windows make.bat to use CC_FOR_TARGET. 2015-03-02 02:20:46 +00:00
Make.dist
make.rc all: delete C libraries and cmd/dist code that builds them 2015-03-01 00:40:23 +00:00
nacltest.bash nacltest.bash: reduce test time by using bootstrapping Go to build fstest_nacl.go 2015-03-24 23:58:14 +00:00
race.bash
race.bat
run.bash build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00
run.bat build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00
run.rc build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00