aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/debug.go
diff options
context:
space:
mode:
authorKeith Rarick <kr@xph.us>2010-12-07 18:06:31 -0500
committerRuss Cox <rsc@golang.org>2010-12-07 18:06:31 -0500
commit51a218385150c44c60d3d61c7a6493a9ca342d29 (patch)
treee07b9cefc9cd188ac98fde405fdd071f5c080d13 /src/pkg/runtime/debug.go
parent63544c47547fd3246e7509e5e13fe90a9d5e3f20 (diff)
downloadgo-51a218385150c44c60d3d61c7a6493a9ca342d29.tar.xz
runtime: add Goroutines
R=rsc CC=golang-dev https://golang.org/cl/3508041
Diffstat (limited to 'src/pkg/runtime/debug.go')
-rw-r--r--src/pkg/runtime/debug.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/runtime/debug.go b/src/pkg/runtime/debug.go
index b5f6571faa..3cc5472f6b 100644
--- a/src/pkg/runtime/debug.go
+++ b/src/pkg/runtime/debug.go
@@ -26,6 +26,9 @@ func GOMAXPROCS(n int) int
// Cgocalls returns the number of cgo calls made by the current process.
func Cgocalls() int64
+// Goroutines returns the number of goroutines that currently exist.
+func Goroutines() int32
+
type MemStatsType struct {
// General statistics.
// Not locked during update; approximate.