aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorhopehook <hopehook.com@gmail.com>2022-08-25 09:42:30 +0800
committerMichael Knyszek <mknyszek@google.com>2022-08-26 15:36:36 +0000
commit951d2c657da75d5aad09719e89987e1e1a43bbb4 (patch)
treea9e307e0b525861d12751ae2ba9665c3c3cb61e8 /src/runtime/runtime2.go
parent7a1ae605ebc0a30c1ec83f967d9a0a20a0bbb02b (diff)
downloadgo-951d2c657da75d5aad09719e89987e1e1a43bbb4.tar.xz
runtime: convert g.selectDone to atomic type
On the write side, g.selectDone has been converted from non-atomic to atomic access. For #53821. Change-Id: Iac46bc6acce7eed51dfd990285dd57f0d58b4ae2 Reviewed-on: https://go-review.googlesource.com/c/go/+/425414 Run-TryBot: hopehook <hopehook@qq.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
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 2d6602071b..19ccfcea0e 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -487,7 +487,7 @@ type g struct {
cgoCtxt []uintptr // cgo traceback context
labels unsafe.Pointer // profiler labels
timer *timer // cached timer for time.Sleep
- selectDone uint32 // are we participating in a select and did someone win the race?
+ selectDone atomic.Uint32 // are we participating in a select and did someone win the race?
// goroutineProfiled indicates the status of this goroutine's stack for the
// current in-progress goroutine profile