aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stack.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-06-03 12:28:24 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-06-03 12:28:24 +0400
commitf5becf4233bd12506cbfcb9cbc04b5968ac11ae0 (patch)
tree8cd4b9fde8bb9ea0b9512b1482b35600c9e7a34c /src/pkg/runtime/stack.c
parentae43ea432dae096add3bb02271fb143733ccd155 (diff)
downloadgo-f5becf4233bd12506cbfcb9cbc04b5968ac11ae0.tar.xz
runtime: add stackguard0 to G
This is part of preemptive scheduler. stackguard0 is checked in split stack checks and can be set to StackPreempt. stackguard is not set to StackPreempt (holds the original value). R=golang-dev, daniel.morsing, iant CC=golang-dev https://golang.org/cl/9875043
Diffstat (limited to 'src/pkg/runtime/stack.c')
-rw-r--r--src/pkg/runtime/stack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c
index b6f64aa766..a033d6b012 100644
--- a/src/pkg/runtime/stack.c
+++ b/src/pkg/runtime/stack.c
@@ -157,6 +157,7 @@ runtime·oldstack(void)
label = top->gobuf;
gp->stackbase = (uintptr)top->stackbase;
gp->stackguard = (uintptr)top->stackguard;
+ gp->stackguard0 = gp->stackguard;
if(top->free != 0)
runtime·stackfree(old, top->free);
@@ -249,6 +250,7 @@ runtime·newstack(void)
gp->stackbase = (uintptr)top;
gp->stackguard = (uintptr)stk + StackGuard;
+ gp->stackguard0 = gp->stackguard;
sp = (byte*)top;
if(argsize > 0) {