diff options
Diffstat (limited to 'src/runtime/debug.go')
-rw-r--r-- | src/runtime/debug.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/debug.go b/src/runtime/debug.go index f411b22676..82deefa200 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -45,7 +45,7 @@ func NumCPU() int { // NumCgoCall returns the number of cgo calls made by the current process. func NumCgoCall() int64 { - var n int64 + var n = int64(atomic.Load64(&ncgocall)) for mp := (*m)(atomic.Loadp(unsafe.Pointer(&allm))); mp != nil; mp = mp.alllink { n += int64(mp.ncgocall) } |