aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2022-07-25 15:39:07 -0400
committerMichael Pratt <mpratt@google.com>2022-08-12 01:52:46 +0000
commit09cc9bac724896cac02b0da8b259febddde52759 (patch)
treee5a9ed99facd1912c0859d2c9122c035fbc47c10 /src/runtime/runtime2.go
parent88ef50e6623e55875d783e5715be1dc0683717e0 (diff)
downloadgo-09cc9bac724896cac02b0da8b259febddde52759.tar.xz
runtime: convert schedt.sysmonwait to atomic type
This converts a few unsynchronized accesses. For #53821. Change-Id: Ie2728779111e3e042696f15648981c5d5a86ca6d Reviewed-on: https://go-review.googlesource.com/c/go/+/419448 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index ed618dff05..9216765fc6 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -820,7 +820,7 @@ type schedt struct {
gcwaiting atomic.Bool // gc is waiting to run
stopwait int32
stopnote note
- sysmonwait uint32
+ sysmonwait atomic.Bool
sysmonnote note
// safepointFn should be called on each P at the next GC