From f8779b9e757e38810bec2284e06fea20bbf09bf4 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 1 Apr 2021 17:01:51 -0400 Subject: runtime: rename _m_ to mp [generated] _g_, _p_, and _m_ are primarily vestiges of the C version of the runtime, while today we prefer Go-style variable names (generally gp, pp, and mp). This change replaces all remaining uses of _m_ with mp. There are very few remaining and all replacements are trivial. [git-generate] cd src/runtime rf 'mv canpanic._m_ canpanic.mp' GOOS=solaris \ rf 'mv semasleep._m_ semasleep.mp' GOOS=aix GOARCH=ppc64 \ rf 'mv semasleep._m_ semasleep.mp' Change-Id: I83690f7b4d4dc57557963100e9a2560ff343f3e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/307813 Trust: Michael Pratt Run-TryBot: Michael Pratt TryBot-Result: Go Bot Reviewed-by: Michael Knyszek --- src/runtime/panic.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime/panic.go') diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 942898716e..c4f3f41ff5 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -1190,22 +1190,22 @@ func canpanic(gp *g) bool { // Note also that g->m can change at preemption, so m can go stale // if this function ever makes a function call. _g_ := getg() - _m_ := _g_.m + mp := _g_.m // Is it okay for gp to panic instead of crashing the program? // Yes, as long as it is running Go code, not runtime code, // and not stuck in a system call. - if gp == nil || gp != _m_.curg { + if gp == nil || gp != mp.curg { return false } - if _m_.locks != 0 || _m_.mallocing != 0 || _m_.throwing != 0 || _m_.preemptoff != "" || _m_.dying != 0 { + if mp.locks != 0 || mp.mallocing != 0 || mp.throwing != 0 || mp.preemptoff != "" || mp.dying != 0 { return false } status := readgstatus(gp) if status&^_Gscan != _Grunning || gp.syscallsp != 0 { return false } - if GOOS == "windows" && _m_.libcallsp != 0 { + if GOOS == "windows" && mp.libcallsp != 0 { return false } return true -- cgit v1.3