]> Cypherpunks repositories - gostls13.git/commit
runtime: remove sched, allp < timers lockrank rule
authorRuss Cox <rsc@golang.org>
Thu, 29 Feb 2024 22:00:29 +0000 (17:00 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 8 Mar 2024 22:17:02 +0000 (22:17 +0000)
commit854dea060e52e5eb8ba965ad7d85dafe7f36d2a6
treea2b4c551aed855e0adc866f07ff597b194877d6b
parent7381123235ec13b596633c81bd9d84342e387e10
runtime: remove sched, allp < timers lockrank rule

allp < timers has not been necessary since CL 258303.

sched < timers was implied by allp < timers, and that
was still necessary, but only when the world is stopped.
Rewrite the code to avoid that lock since the world is stopped.

Now timers and timer are independent of the scheduler,
so they could call into the scheduler (for example to ready
a goroutine) if we wanted them to.

Change-Id: I12a93013c98e51c9e2f2148175b02afce8384a59
Reviewed-on: https://go-review.googlesource.com/c/go/+/568337
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
src/runtime/lockrank.go
src/runtime/mklockrank.go
src/runtime/time.go