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/runtime.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pkg/runtime/runtime.h') diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 2d918f4cff..e616990ccf 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -226,7 +226,8 @@ struct GCStats }; struct G { - uintptr stackguard; // cannot move - also known to linker, libmach, runtime/cgo + // stackguard0 can be set to StackPreempt as opposed to stackguard + uintptr stackguard0; // cannot move - also known to linker, libmach, runtime/cgo uintptr stackbase; // cannot move - also known to libmach, runtime/cgo Defer* defer; Panic* panic; @@ -235,6 +236,7 @@ struct G uintptr gcsp; // if status==Gsyscall, gcsp = sched.sp to use during gc byte* gcpc; // if status==Gsyscall, gcpc = sched.pc to use during gc uintptr gcguard; // if status==Gsyscall, gcguard = stackguard to use during gc + uintptr stackguard; // same as stackguard0, but not set to StackPreempt uintptr stack0; FuncVal* fnstart; // initial function G* alllink; // on allg -- cgit v1.3-5-g9baa