diff options
| author | hopehook <hopehook.com@gmail.com> | 2022-08-25 10:13:03 +0800 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2022-08-26 15:35:13 +0000 |
| commit | 2883af63c28d1a4398cd60745d3c0cb7f7fbdacf (patch) | |
| tree | 4c24422f16023f90223d4615c02324148c28f98a /src/runtime/runtime2.go | |
| parent | 1211a62bdcb0f070c5082255bcc90e1a14c16bb2 (diff) | |
| download | go-2883af63c28d1a4398cd60745d3c0cb7f7fbdacf.tar.xz | |
runtime: convert p.statsSeq to internal atomic type
For #53821.
Change-Id: I1cab3671a29c218b8a927aba9064e63b65900173
Reviewed-on: https://go-review.googlesource.com/c/go/+/425416
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: hopehook <hopehook@qq.com>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 5e12ac73bc..2d6602071b 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -708,7 +708,7 @@ type p struct { // statsSeq is a counter indicating whether this P is currently // writing any stats. Its value is even when not, odd when it is. - statsSeq uint32 + statsSeq atomic.Uint32 // Lock for timers. We normally access the timers while running // on this P, but the scheduler can also do it from a different P. |
