aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_test.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/export_test.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/export_test.go')
-rw-r--r--src/runtime/export_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index e60bcedf14..ab0537d8b2 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -460,17 +460,17 @@ func MapBucketsPointerIsNil(m map[int]int) bool {
}
func LockOSCounts() (external, internal uint32) {
- g := getg()
- if g.m.lockedExt+g.m.lockedInt == 0 {
- if g.lockedm != 0 {
+ gp := getg()
+ if gp.m.lockedExt+gp.m.lockedInt == 0 {
+ if gp.lockedm != 0 {
panic("lockedm on non-locked goroutine")
}
} else {
- if g.lockedm == 0 {
+ if gp.lockedm == 0 {
panic("nil lockedm on locked goroutine")
}
}
- return g.m.lockedExt, g.m.lockedInt
+ return gp.m.lockedExt, gp.m.lockedInt
}
//go:noinline