diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-06-03 12:28:24 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-06-03 12:28:24 +0400 |
| commit | f5becf4233bd12506cbfcb9cbc04b5968ac11ae0 (patch) | |
| tree | 8cd4b9fde8bb9ea0b9512b1482b35600c9e7a34c /src/pkg/runtime/runtime.h | |
| parent | ae43ea432dae096add3bb02271fb143733ccd155 (diff) | |
| download | go-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/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
