mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
1211a62bdc
commit
2883af63c2
2 changed files with 4 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue