mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: convert schedt.gcwaiting to atomic type
Note that this replaces numerous unsynchronized loads throughout the scheduler. For #53821. Change-Id: Ica80b04c9e8c184bfef186e549526fc3f117c387 Reviewed-on: https://go-review.googlesource.com/c/go/+/419447 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
1eeef5d5b4
commit
88ef50e662
3 changed files with 15 additions and 15 deletions
|
|
@ -817,7 +817,7 @@ type schedt struct {
|
|||
// m.exited is set. Linked through m.freelink.
|
||||
freem *m
|
||||
|
||||
gcwaiting uint32 // gc is waiting to run
|
||||
gcwaiting atomic.Bool // gc is waiting to run
|
||||
stopwait int32
|
||||
stopnote note
|
||||
sysmonwait uint32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue