mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
ae43ea432d
commit
f5becf4233
7 changed files with 24 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue