From 29b9a328d268d53833d2cc063d1d8b4bf6852675 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 20 Jul 2022 13:18:06 -0400 Subject: runtime: trivial replacements of g in remaining files Rename g variables to gp for consistency. Change-Id: I09ecdc7e8439637bc0e32f9c5f96f515e6436362 Reviewed-on: https://go-review.googlesource.com/c/go/+/418591 Reviewed-by: Austin Clements Run-TryBot: Michael Pratt --- src/runtime/debug.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/runtime/debug.go') diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 0ab23e0eb7..669c36f0d5 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -85,13 +85,13 @@ func debug_modinfo() string { //go:linkname mayMoreStackPreempt func mayMoreStackPreempt() { // Don't do anything on the g0 or gsignal stack. - g := getg() - if g == g.m.g0 || g == g.m.gsignal { + gp := getg() + if gp == gp.m.g0 || gp == gp.m.gsignal { return } // Force a preemption, unless the stack is already poisoned. - if g.stackguard0 < stackPoisonMin { - g.stackguard0 = stackPreempt + if gp.stackguard0 < stackPoisonMin { + gp.stackguard0 = stackPreempt } } @@ -104,12 +104,12 @@ func mayMoreStackPreempt() { //go:linkname mayMoreStackMove func mayMoreStackMove() { // Don't do anything on the g0 or gsignal stack. - g := getg() - if g == g.m.g0 || g == g.m.gsignal { + gp := getg() + if gp == gp.m.g0 || gp == gp.m.gsignal { return } // Force stack movement, unless the stack is already poisoned. - if g.stackguard0 < stackPoisonMin { - g.stackguard0 = stackForceMove + if gp.stackguard0 < stackPoisonMin { + gp.stackguard0 = stackForceMove } } -- cgit v1.3