]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: convert schedt.npidle to atomic type
authorMichael Pratt <mpratt@google.com>
Wed, 20 Jul 2022 22:01:31 +0000 (18:01 -0400)
committerMichael Pratt <mpratt@google.com>
Fri, 12 Aug 2022 01:52:06 +0000 (01:52 +0000)
commit58a1dabfd1b2bbc2a6a9a2e1cda3e98d93d61258
tree00c6a0188d39e804d1d688fbcb9f838d873b10cf
parent449691b3ef1d93125757037a9ab3f462ccab8f31
runtime: convert schedt.npidle to atomic type

Note that this converts npidle from uint32 to int32 for consistency with
the other count fields in schedt and the type of p.id.

Note that this changes previously unsynchronized operations to
synchronized operations in:
  * handoffp
  * injectglist
  * schedtrace
  * schedEnableUser
  * sync_runtime_canSpin

For #53821.

Change-Id: I36d1b3b4a28131c9d47884fade6bc44439dd6937
Reviewed-on: https://go-review.googlesource.com/c/go/+/419445
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
src/runtime/mgcpacer.go
src/runtime/proc.go
src/runtime/runtime2.go