runtime: convert schedt.ngsys to atomic type

Note that this converts ngsys from uint32 to int32 to match the other
(non-atomic) counters.

For #53821.

Change-Id: I3acbfbbd1dabc59b0ea5ddc86a97e0d0afa9f80c
Reviewed-on: https://go-review.googlesource.com/c/go/+/419444
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
Michael Pratt 2022-07-20 17:48:19 -04:00
parent 0fc774a68f
commit 449691b3ef
2 changed files with 7 additions and 7 deletions

View file

@ -775,7 +775,7 @@ type schedt struct {
nmsys int32 // number of system m's not counted for deadlock
nmfreed int64 // cumulative number of freed m's
ngsys uint32 // number of system goroutines; updated atomically
ngsys atomic.Int32 // number of system goroutines
pidle puintptr // idle p's
npidle uint32