aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2014-12-29 01:08:40 -0500
committerKeith Randall <khr@golang.org>2014-12-29 07:36:07 +0000
commitab0535ae3fb45ba734d47542cc4845f27f708d1b (patch)
tree0357ccba7c596a90470785ebd189416d15b6d74e /src/runtime/runtime2.go
parent3b76b017cabb0ea29a184670e081edfe11afb8de (diff)
downloadgo-ab0535ae3fb45ba734d47542cc4845f27f708d1b.tar.xz
liblink, cmd/ld, runtime: remove stackguard1
Now that we've removed all the C code in runtime and the C compilers, there is no need to have a separate stackguard field to check for C code on Go stack. Remove field g.stackguard1 and rename g.stackguard0 to g.stackguard. Adjust liblink and cmd/ld as necessary. Change-Id: I54e75db5a93d783e86af5ff1a6cd497d669d8d33 Reviewed-on: https://go-review.googlesource.com/2144 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 3b7db1e412..8425729fff 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -154,14 +154,10 @@ type stack struct {
type g struct {
// Stack parameters.
// stack describes the actual stack memory: [stack.lo, stack.hi).
- // stackguard0 is the stack pointer compared in the Go stack growth prologue.
+ // stackguard is the stack pointer compared in the Go stack growth prologue.
// It is stack.lo+StackGuard normally, but can be StackPreempt to trigger a preemption.
- // stackguard1 is the stack pointer compared in the C stack growth prologue.
- // It is stack.lo+StackGuard on g0 and gsignal stacks.
- // It is ~0 on other goroutine stacks, to trigger a call to morestackc (and crash).
- stack stack // offset known to runtime/cgo
- stackguard0 uintptr // offset known to liblink
- stackguard1 uintptr // offset known to liblink
+ stack stack // offset known to runtime/cgo
+ stackguard uintptr // offset known to liblink
_panic *_panic // innermost panic - offset known to liblink
_defer *_defer // innermost defer
@@ -175,7 +171,7 @@ type g struct {
waitreason string // if status==gwaiting
schedlink *g
issystem bool // do not output in stack dump, ignore in deadlock detector
- preempt bool // preemption signal, duplicates stackguard0 = stackpreempt
+ preempt bool // preemption signal, duplicates stackguard = stackpreempt
paniconfault bool // panic (instead of crash) on unexpected fault address
preemptscan bool // preempted g does scan for gc
gcworkdone bool // debug: cleared at begining of gc work phase cycle, set by gcphasework, tested at end of cycle