]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: rename findrunnable references to findRunnable
authorMichael Pratt <mpratt@google.com>
Mon, 17 Nov 2025 18:34:51 +0000 (13:34 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 17 Nov 2025 19:49:59 +0000 (11:49 -0800)
These cases were missed by CL 393880.

Change-Id: I6a6a636cf0d97a4efcf4b9df766002ecef48b4de
Reviewed-on: https://go-review.googlesource.com/c/go/+/721120
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/proc.go
src/runtime/runtime2.go

index 61364d91ff90660b8472b4bb64541b83a4c70f2a..a378b8c39d376b6689dc1d7057207db4466c1be2 100644 (file)
@@ -3119,7 +3119,7 @@ func startm(pp *p, spinning, lockheld bool) {
 //go:nowritebarrierrec
 func handoffp(pp *p) {
        // handoffp must start an M in any situation where
-       // findrunnable would return a G to run on pp.
+       // findRunnable would return a G to run on pp.
 
        // if it has local work, start it straight away
        if !runqempty(pp) || !sched.runq.empty() {
@@ -3362,7 +3362,7 @@ func findRunnable() (gp *g, inheritTime, tryWakeP bool) {
        mp := getg().m
 
        // The conditions here and in handoffp must agree: if
-       // findrunnable would return a G to run, handoffp must start
+       // findRunnable would return a G to run, handoffp must start
        // an M.
 
 top:
@@ -3586,7 +3586,7 @@ top:
                goto top
        }
        if releasep() != pp {
-               throw("findrunnable: wrong p")
+               throw("findRunnable: wrong p")
        }
        now = pidleput(pp, now)
        unlock(&sched.lock)
@@ -3631,7 +3631,7 @@ top:
        if mp.spinning {
                mp.spinning = false
                if sched.nmspinning.Add(-1) < 0 {
-                       throw("findrunnable: negative nmspinning")
+                       throw("findRunnable: negative nmspinning")
                }
 
                // Note the for correctness, only the last M transitioning from
@@ -3704,10 +3704,10 @@ top:
        if netpollinited() && (netpollAnyWaiters() || pollUntil != 0) && sched.lastpoll.Swap(0) != 0 {
                sched.pollUntil.Store(pollUntil)
                if mp.p != 0 {
-                       throw("findrunnable: netpoll with p")
+                       throw("findRunnable: netpoll with p")
                }
                if mp.spinning {
-                       throw("findrunnable: netpoll with spinning")
+                       throw("findRunnable: netpoll with spinning")
                }
                delay := int64(-1)
                if pollUntil != 0 {
@@ -3973,7 +3973,7 @@ func checkIdleGCNoP() (*p, *g) {
 // timers and the network poller if there isn't one already.
 func wakeNetPoller(when int64) {
        if sched.lastpoll.Load() == 0 {
-               // In findrunnable we ensure that when polling the pollUntil
+               // In findRunnable we ensure that when polling the pollUntil
                // field is either zero or the time to which the current
                // poll is expected to run. This can have a spurious wakeup
                // but should never miss a wakeup.
@@ -3998,7 +3998,7 @@ func resetspinning() {
        gp.m.spinning = false
        nmspinning := sched.nmspinning.Add(-1)
        if nmspinning < 0 {
-               throw("findrunnable: negative nmspinning")
+               throw("findRunnable: negative nmspinning")
        }
        // M wakeup policy is deliberately somewhat conservative, so check if we
        // need to wakeup another P here. See "Worker thread parking/unparking"
@@ -7269,7 +7269,7 @@ func pidlegetSpinning(now int64) (*p, int64) {
 
        pp, now := pidleget(now)
        if pp == nil {
-               // See "Delicate dance" comment in findrunnable. We found work
+               // See "Delicate dance" comment in findRunnable. We found work
                // that we cannot take, we must synchronize with non-spinning
                // Ms that may be preparing to drop their P.
                sched.needspinning.Store(1)
index 6c955460d4f9993a8f6159561efec10dc957160b..e415df6ec1a54f0c99a1ab38f31200109e50c494 100644 (file)
@@ -1425,9 +1425,9 @@ var (
        // must be set. An idle P (passed to pidleput) cannot add new timers while
        // idle, so if it has no timers at that time, its mask may be cleared.
        //
-       // Thus, we get the following effects on timer-stealing in findrunnable:
+       // Thus, we get the following effects on timer-stealing in findRunnable:
        //
-       //   - Idle Ps with no timers when they go idle are never checked in findrunnable
+       //   - Idle Ps with no timers when they go idle are never checked in findRunnable
        //     (for work- or timer-stealing; this is the ideal case).
        //   - Running Ps must always be checked.
        //   - Idle Ps whose timers are stolen must continue to be checked until they run