aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2022-08-17 17:36:12 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2022-08-17 17:47:37 +0000
commitbc805795bd28ae4cd1a70b3053a3a71668bfef87 (patch)
tree248cdbc68eb93d56c98cf391a38b89ac36adbb07 /src/runtime/runtime2.go
parent7e7ecf5cbbd5c0b61e693a65c865bf372fc2ea80 (diff)
downloadgo-bc805795bd28ae4cd1a70b3053a3a71668bfef87.tar.xz
runtime: convert m.preemptGen to atomic type
Updates #53821 Change-Id: I134dac3b1eb35f2da00e5ef8f4c264f08d4f65b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/423887 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 3cf0e8e98b..63ba534815 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -583,8 +583,8 @@ type m struct {
// preemptGen counts the number of completed preemption
// signals. This is used to detect when a preemption is
- // requested, but fails. Accessed atomically.
- preemptGen uint32
+ // requested, but fails.
+ preemptGen atomic.Uint32
// Whether this is a pending preemption signal on this M.
signalPending atomic.Uint32