diff options
| author | Andy Pan <panjf2000@gmail.com> | 2022-08-25 03:27:02 +0800 |
|---|---|---|
| committer | Daniel Martà <mvdan@mvdan.cc> | 2022-09-05 07:14:08 +0000 |
| commit | 3fbcf05d40ed870d8b7a08c7fff9623a201c1567 (patch) | |
| tree | 41997bd06f01c6608423242b41b22b8cb38197ac /src/runtime/export_debug_test.go | |
| parent | be26aa70d432572599d185492f5e2b095d75cc4d (diff) | |
| download | go-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/export_debug_test.go')
| -rw-r--r-- | src/runtime/export_debug_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/export_debug_test.go b/src/runtime/export_debug_test.go index 09e9779696..2d8a133409 100644 --- a/src/runtime/export_debug_test.go +++ b/src/runtime/export_debug_test.go @@ -109,7 +109,7 @@ func (h *debugCallHandler) inject(info *siginfo, ctxt *sigctxt, gp2 *g) bool { // a signal handler. Add the go:nowritebarrierrec annotation and restructure // this to avoid write barriers. - switch h.gp.atomicstatus { + switch h.gp.atomicstatus.Load() { case _Grunning: if getg().m != h.mp { println("trap on wrong M", getg().m, h.mp) |
