From e1fd51e0765a5d7b2dd72b2f82b9c3eed2764035 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 17 Aug 2022 14:56:18 +0700 Subject: runtime: convert p.timer0When to atomic type Updates #53821 Change-Id: I523ec61116d290ecf7b7e3eb96e468695766cb4d Reviewed-on: https://go-review.googlesource.com/c/go/+/424396 Run-TryBot: Cuong Manh Le Auto-Submit: Cuong Manh Le Reviewed-by: Keith Randall Reviewed-by: Michael Pratt TryBot-Result: Gopher Robot --- src/runtime/runtime2.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/runtime/runtime2.go') diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 63ba534815..34638d9fb3 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -670,9 +670,8 @@ type p struct { _ uint32 // Alignment for atomic fields below // The when field of the first entry on the timer heap. - // This is updated using atomic functions. // This is 0 if the timer heap is empty. - timer0When uint64 + timer0When atomic.Uint64 // The earliest known nextwhen field of a timer with // timerModifiedEarlier status. Because the timer may have been -- cgit v1.3-5-g45d5