aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorAndy Pan <panjf2000@gmail.com>2022-08-25 03:27:02 +0800
committerDaniel Martí <mvdan@mvdan.cc>2022-09-05 07:14:08 +0000
commit3fbcf05d40ed870d8b7a08c7fff9623a201c1567 (patch)
tree41997bd06f01c6608423242b41b22b8cb38197ac /src/runtime/runtime2.go
parentbe26aa70d432572599d185492f5e2b095d75cc4d (diff)
downloadgo-3fbcf05d40ed870d8b7a08c7fff9623a201c1567.tar.xz
runtime: convert g.atomicstatus to internal atomic type
Note that this changes some unsynchronized operations of g.atomicstatus to synchronized operations. Updates #53821 Change-Id: If249d62420ea09fbec39b570942f96c63669c333 Reviewed-on: https://go-review.googlesource.com/c/go/+/425363 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Heschi Kreinick <heschi@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 f9bdb8e236..40d3805808 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -435,7 +435,7 @@ type g struct {
// 3. By debugCallWrap to pass parameters to a new goroutine because allocating a
// closure in the runtime is forbidden.
param unsafe.Pointer
- atomicstatus uint32
+ atomicstatus atomic.Uint32
stackLock uint32 // sigprof/scang lock; TODO: fold in to atomicstatus
goid uint64
schedlink guintptr