aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorDaniel Morsing <daniel.morsing@gmail.com>2017-08-02 19:01:17 +0100
committerDaniel Morsing <daniel.morsing@gmail.com>2017-08-15 19:18:00 +0000
commit32b94f13cf35e619a0dae6e1e381adc7e182d283 (patch)
tree64d58aca0d055ac7ced3b9a611d5ed36e9980d6c /src/runtime/stack.go
parent89d74f54168619cf1f36b6868626fbb1237c1deb (diff)
downloadgo-32b94f13cf35e619a0dae6e1e381adc7e182d283.tar.xz
runtime: move selectdone into g
Writing to selectdone on the stack of another goroutine meant a pretty subtle dance between the select code and the stack copying code. Instead move the selectdone variable into the g struct. Change-Id: Id246aaf18077c625adef7ca2d62794afef1bdd1b Reviewed-on: https://go-review.googlesource.com/53390 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
-rw-r--r--src/runtime/stack.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index 525d0b14c1..d353329a39 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -751,7 +751,6 @@ func adjustsudogs(gp *g, adjinfo *adjustinfo) {
// might be in the stack.
for s := gp.waiting; s != nil; s = s.waitlink {
adjustpointer(adjinfo, unsafe.Pointer(&s.elem))
- adjustpointer(adjinfo, unsafe.Pointer(&s.selectdone))
}
}
@@ -768,10 +767,6 @@ func findsghi(gp *g, stk stack) uintptr {
if stk.lo <= p && p < stk.hi && p > sghi {
sghi = p
}
- p = uintptr(unsafe.Pointer(sg.selectdone)) + unsafe.Sizeof(sg.selectdone)
- if stk.lo <= p && p < stk.hi && p > sghi {
- sghi = p
- }
}
return sghi
}