diff options
| author | Michael Pratt <mpratt@google.com> | 2021-02-09 15:48:41 -0500 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2022-08-02 18:51:06 +0000 |
| commit | 5e8d261918e1cd9a731ec8688cc969cebcc9ff39 (patch) | |
| tree | 8cb573953cdd75a0e41eb40e662faa1ead99fccb /src/runtime/export_test.go | |
| parent | 0ad2ec6596afc51341fa3059528d89a0508956ab (diff) | |
| download | go-5e8d261918e1cd9a731ec8688cc969cebcc9ff39.tar.xz | |
runtime: rename _p_ to pp
_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 _p_ with pp. These are all
trivial replacements (i.e., no conflicts). That said, there are several
functions that refer to two different Ps at once. There the naming
convention is generally that pp refers to the local P, and p2 refers to
the other P we are accessing.
Change-Id: I205b801be839216972e7644b1fbeacdbf2612859
Reviewed-on: https://go-review.googlesource.com/c/go/+/306674
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 9639946fa9..e60bcedf14 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -84,23 +84,23 @@ func GCMask(x any) (ret []byte) { } func RunSchedLocalQueueTest() { - _p_ := new(p) - gs := make([]g, len(_p_.runq)) + pp := new(p) + gs := make([]g, len(pp.runq)) Escape(gs) // Ensure gs doesn't move, since we use guintptrs - for i := 0; i < len(_p_.runq); i++ { - if g, _ := runqget(_p_); g != nil { + for i := 0; i < len(pp.runq); i++ { + if g, _ := runqget(pp); g != nil { throw("runq is not empty initially") } for j := 0; j < i; j++ { - runqput(_p_, &gs[i], false) + runqput(pp, &gs[i], false) } for j := 0; j < i; j++ { - if g, _ := runqget(_p_); g != &gs[i] { + if g, _ := runqget(pp); g != &gs[i] { print("bad element at iter ", i, "/", j, "\n") throw("bad element") } } - if g, _ := runqget(_p_); g != nil { + if g, _ := runqget(pp); g != nil { throw("runq is not empty afterwards") } } |
