mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
0ad2ec6596
commit
5e8d261918
7 changed files with 332 additions and 332 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue