aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2022-08-17 14:59:57 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2022-08-18 01:46:15 +0000
commitbb5d656a3ac78575d9e2c9bed026cc1756fab179 (patch)
treec8aeb18704bf0d9ae4c242137d224819094cda5d /src/runtime/runtime2.go
parentb30ba3df9ff8969f934bec5016cfce4b91f6ea5b (diff)
downloadgo-bb5d656a3ac78575d9e2c9bed026cc1756fab179.tar.xz
runtime: convert p.timerModifiedEarliest to atomic type
Updates #53821 Change-Id: Iac0d7a3871d9e3ee0ba38ee7ab989faca9c89666 Reviewed-on: https://go-review.googlesource.com/c/go/+/424397 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 34638d9fb3..79c8ccb6ec 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -676,9 +676,8 @@ type p struct {
// The earliest known nextwhen field of a timer with
// timerModifiedEarlier status. Because the timer may have been
// modified again, there need not be any timer with this value.
- // This is updated using atomic functions.
// This is 0 if there are no timerModifiedEarlier timers.
- timerModifiedEarliest uint64
+ timerModifiedEarliest atomic.Uint64
// Per-P GC state
gcAssistTime int64 // Nanoseconds in assistAlloc