diff options
| author | Michael Pratt <mpratt@google.com> | 2022-07-20 13:49:17 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2022-08-02 18:52:03 +0000 |
| commit | 4400238ec8ef3f0d2609bbd18ea57d6c5d097f1d (patch) | |
| tree | addacd410bdf3f1b5b13e46870ef58284760364c /src/runtime/runtime1.go | |
| parent | 5999a28de80cf685b037e53c8dc9a511f11fe7b2 (diff) | |
| download | go-4400238ec8ef3f0d2609bbd18ea57d6c5d097f1d.tar.xz | |
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 <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/runtime1.go')
| -rw-r--r-- | src/runtime/runtime1.go | 22 |
1 files changed, 11 insertions, 11 deletions
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 } } |
