From 4400238ec8ef3f0d2609bbd18ea57d6c5d097f1d Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 20 Jul 2022 13:49:17 -0400 Subject: runtime: trivial replacements of _g_ in remaining files Change-Id: I24d299b345bda1c9d6fa7876d4f03c05b8c1156d Reviewed-on: https://go-review.googlesource.com/c/go/+/418587 TryBot-Result: Gopher Robot Run-TryBot: Michael Pratt Reviewed-by: Austin Clements --- src/runtime/runtime1.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/runtime/runtime1.go') diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index e307901fc2..b0a458d187 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -35,13 +35,13 @@ var traceback_env uint32 // //go:nosplit func gotraceback() (level int32, all, crash bool) { - _g_ := getg() + gp := getg() t := atomic.Load(&traceback_cache) crash = t&tracebackCrash != 0 - all = _g_.m.throwing >= throwTypeUser || t&tracebackAll != 0 - if _g_.m.traceback != 0 { - level = int32(_g_.m.traceback) - } else if _g_.m.throwing >= throwTypeRuntime { + all = gp.m.throwing >= throwTypeUser || t&tracebackAll != 0 + if gp.m.traceback != 0 { + level = int32(gp.m.traceback) + } else if gp.m.throwing >= throwTypeRuntime { // Always include runtime frames in runtime throws unless // otherwise overridden by m.traceback. level = 2 @@ -474,18 +474,18 @@ func timediv(v int64, div int32, rem *int32) int32 { //go:nosplit func acquirem() *m { - _g_ := getg() - _g_.m.locks++ - return _g_.m + gp := getg() + gp.m.locks++ + return gp.m } //go:nosplit func releasem(mp *m) { - _g_ := getg() + gp := getg() mp.locks-- - if mp.locks == 0 && _g_.preempt { + if mp.locks == 0 && gp.preempt { // restore the preemption request in case we've cleared it in newstack - _g_.stackguard0 = stackPreempt + gp.stackguard0 = stackPreempt } } -- cgit v1.3-5-g9baa