aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorcuiweixie <cuiweixie@gmail.com>2022-08-27 09:45:15 +0800
committerMichael Pratt <mpratt@google.com>2022-09-01 18:02:28 +0000
commit5a6db7c48fb8a1e7b6d8f59ba4e3b7ecb8c35fc7 (patch)
tree75ddc372861bddfa4ae6ccdf9eacbd33613640c4 /src/runtime/proc.go
parentaf991a6d28949cd27a41a93b46abf42cbf07023d (diff)
downloadgo-5a6db7c48fb8a1e7b6d8f59ba4e3b7ecb8c35fc7.tar.xz
runtime: convert ncgocall to atomic type
For #53821 Change-Id: Ib0d62ee36487b3ed68e063976968f3cac6499e4b Reviewed-on: https://go-review.googlesource.com/c/go/+/426075 Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: xie cui <523516579@qq.com> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 6ecb786d1b..89cb5c70f0 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -1530,7 +1530,7 @@ found:
}
unlock(&sched.lock)
- atomic.Xadd64(&ncgocall, int64(mp.ncgocall))
+ ncgocall.Add(int64(mp.ncgocall))
// Release the P.
handoffp(releasep())