]> Cypherpunks repositories - gostls13.git/commit
runtime: use timer.lock in deltimer
authorRuss Cox <rsc@golang.org>
Wed, 14 Feb 2024 16:57:00 +0000 (11:57 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 28 Feb 2024 16:44:02 +0000 (16:44 +0000)
commit51df232b122b77c1bb066e53300247ec68695743
tree5427d627e8384a2151e900340677e0d302f5f528
parentdb8c6c8c7a198be10310387e9212004dd3163a27
runtime: use timer.lock in deltimer

The state set is now simplified enough that all the CAS loops
are starting to look the same: they are just spin locks.
So introduce an actual timer.lock method and use it in deltimer.

[This is one CL in a refactoring stack making very small changes
in each step, so that any subtle bugs that we miss can be more
easily pinpointed to a small change.]

Change-Id: Ifd7f20eeede5c764ef10ecba64855c29a5ddbe39
Reviewed-on: https://go-review.googlesource.com/c/go/+/564124
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/time.go