diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2022-08-17 14:56:18 +0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-08-17 18:01:43 +0000 |
| commit | e1fd51e0765a5d7b2dd72b2f82b9c3eed2764035 (patch) | |
| tree | 7c1891dba2197932b231a95332a97f24b723c6af /src/runtime/runtime2.go | |
| parent | bc805795bd28ae4cd1a70b3053a3a71668bfef87 (diff) | |
| download | go-e1fd51e0765a5d7b2dd72b2f82b9c3eed2764035.tar.xz | |
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 <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 3 |
1 files changed, 1 insertions, 2 deletions
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 |
