diff options
| author | Michael Pratt <mpratt@google.com> | 2022-07-20 12:59:50 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2022-08-02 18:51:53 +0000 |
| commit | 0e18cf6d093c217cb7f093382cc83f0ea072c2e6 (patch) | |
| tree | 8743457a32a8c3ca16e41c2b3784151563dfa565 /src/runtime/mgcsweep.go | |
| parent | 4358a53a9727f508c986cb675cba04e1858b83d3 (diff) | |
| download | go-0e18cf6d093c217cb7f093382cc83f0ea072c2e6.tar.xz | |
runtime: trivial replacements of _g_ in GC files
Change-Id: Iedf10558d9a1d3b80a151927b99660b688ed9ccb
Reviewed-on: https://go-review.googlesource.com/c/go/+/418585
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mgcsweep.go')
| -rw-r--r-- | src/runtime/mgcsweep.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/mgcsweep.go b/src/runtime/mgcsweep.go index de57f18c4f..2ac5d507dd 100644 --- a/src/runtime/mgcsweep.go +++ b/src/runtime/mgcsweep.go @@ -431,8 +431,8 @@ func (s *mspan) ensureSwept() { // Caller must disable preemption. // Otherwise when this function returns the span can become unswept again // (if GC is triggered on another goroutine). - _g_ := getg() - if _g_.m.locks == 0 && _g_.m.mallocing == 0 && _g_ != _g_.m.g0 { + gp := getg() + if gp.m.locks == 0 && gp.m.mallocing == 0 && gp != gp.m.g0 { throw("mspan.ensureSwept: m is not locked") } @@ -470,8 +470,8 @@ func (s *mspan) ensureSwept() { func (sl *sweepLocked) sweep(preserve bool) bool { // It's critical that we enter this function with preemption disabled, // GC must not start while we are in the middle of this function. - _g_ := getg() - if _g_.m.locks == 0 && _g_.m.mallocing == 0 && _g_ != _g_.m.g0 { + gp := getg() + if gp.m.locks == 0 && gp.m.mallocing == 0 && gp != gp.m.g0 { throw("mspan.sweep: m is not locked") } |
