aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2022-07-20 13:18:06 -0400
committerMichael Pratt <mpratt@google.com>2022-08-02 18:52:33 +0000
commit29b9a328d268d53833d2cc063d1d8b4bf6852675 (patch)
treeb6158ac289e07aaaf6ce2585e7f46a2ab3289e9a /src/runtime/debug.go
parentc647264619bba886f1bff90e594d3cddc057f6ce (diff)
downloadgo-29b9a328d268d53833d2cc063d1d8b4bf6852675.tar.xz
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 <austin@google.com> Run-TryBot: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/debug.go')
-rw-r--r--src/runtime/debug.go16
1 files changed, 8 insertions, 8 deletions
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
}
}