From f5becf4233bd12506cbfcb9cbc04b5968ac11ae0 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Mon, 3 Jun 2013 12:28:24 +0400 Subject: 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 --- src/pkg/runtime/stack.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pkg/runtime/stack.c') 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) { -- cgit v1.3