aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os3_plan9.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-04-17 00:21:30 -0400
committerRuss Cox <rsc@golang.org>2015-04-20 20:20:09 +0000
commit181e26b9fa3c85ca5a512a51278b3f22f6e64dc9 (patch)
tree441826cbaff52d78373d650977d3c0cfd619054a /src/runtime/os3_plan9.go
parentc776592a4ff17b2153492bf5b17ae3151a42abf0 (diff)
downloadgo-181e26b9fa3c85ca5a512a51278b3f22f6e64dc9.tar.gz
go-181e26b9fa3c85ca5a512a51278b3f22f6e64dc9.zip
runtime: replace func-based write barrier skipping with type-based
This CL revises CL 7504 to use explicitly uintptr types for the struct fields that are going to be updated sometimes without write barriers. The result is that the fields are now updated *always* without write barriers. This approach has two important properties: 1) Now the GC never looks at the field, so if the missing reference could cause a problem, it will do so all the time, not just when the write barrier is missed at just the right moment. 2) Now a write barrier never happens for the field, avoiding the (correct) detection of inconsistent write barriers when GODEBUG=wbshadow=1. Change-Id: Iebd3962c727c0046495cc08914a8dc0808460e0e Reviewed-on: https://go-review.googlesource.com/9019 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/os3_plan9.go')
-rw-r--r--src/runtime/os3_plan9.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/os3_plan9.go b/src/runtime/os3_plan9.go
index fa49ad681f..248576a102 100644
--- a/src/runtime/os3_plan9.go
+++ b/src/runtime/os3_plan9.go
@@ -81,7 +81,7 @@ func sighandler(_ureg *ureg, note *byte, gp *g) int {
}
Throw:
_g_.m.throwing = 1
- setGNoWriteBarrier(&_g_.m.caughtsig, gp)
+ _g_.m.caughtsig.set(gp)
startpanic()
print(notestr, "\n")
print("PC=", hex(c.pc()), "\n")