aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorDavid Symonds <dsymonds@golang.org>2012-02-17 08:49:41 +1100
committerDavid Symonds <dsymonds@golang.org>2012-02-17 08:49:41 +1100
commit4b171e5040935f65c011ea58dde6fb49fcd9e6b3 (patch)
tree5539102cfeb5995dc8050130063bafa89ce85380 /src/pkg/runtime
parent7fc47928fc807a0c79c5649d7ee9e10d55f3c360 (diff)
downloadgo-4b171e5040935f65c011ea58dde6fb49fcd9e6b3.tar.xz
runtime: rename Cgocalls and Goroutines to NumCgoCall and NumGoroutine, respectively.
Update some other docs too. Update #2955. R=rsc CC=golang-dev https://golang.org/cl/5676060
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/cgocall.c2
-rw-r--r--src/pkg/runtime/debug.go8
-rw-r--r--src/pkg/runtime/extern.go4
-rw-r--r--src/pkg/runtime/proc.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/pkg/runtime/cgocall.c b/src/pkg/runtime/cgocall.c
index 756eff38f7..7a26538ec8 100644
--- a/src/pkg/runtime/cgocall.c
+++ b/src/pkg/runtime/cgocall.c
@@ -151,7 +151,7 @@ unlockm(void)
}
void
-runtime·Cgocalls(int64 ret)
+runtime·NumCgoCall(int64 ret)
{
M *m;
diff --git a/src/pkg/runtime/debug.go b/src/pkg/runtime/debug.go
index bd6dcc971a..861017d5ff 100644
--- a/src/pkg/runtime/debug.go
+++ b/src/pkg/runtime/debug.go
@@ -26,11 +26,11 @@ func GOMAXPROCS(n int) int
// NumCPU returns the number of logical CPUs on the local machine.
func NumCPU() int
-// Cgocalls returns the number of cgo calls made by the current process.
-func Cgocalls() int64
+// NumCgoCall returns the number of cgo calls made by the current process.
+func NumCgoCall() int64
-// Goroutines returns the number of goroutines that currently exist.
-func Goroutines() int32
+// NumGoroutine returns the number of goroutines that currently exist.
+func NumGoroutine() int32
// Alloc allocates a block of the given size.
// FOR TESTING AND DEBUGGING ONLY.
diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go
index eafa2f19f1..42caeb0df3 100644
--- a/src/pkg/runtime/extern.go
+++ b/src/pkg/runtime/extern.go
@@ -141,10 +141,10 @@ func Version() string {
return theVersion
}
-// GOOS is the Go tree's operating system target:
+// GOOS is the running program's operating system target:
// one of darwin, freebsd, linux, and so on.
const GOOS string = theGoos
-// GOARCH is the Go tree's architecture target:
+// GOARCH is the running program's architecture target:
// 386, amd64, or arm.
const GOARCH string = theGoarch
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 3dbf77a105..d9047c92c1 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -342,7 +342,7 @@ mcommoninit(M *m)
// Add to runtime·allm so garbage collector doesn't free m
// when it is just in a register or thread-local storage.
m->alllink = runtime·allm;
- // runtime·Cgocalls() iterates over allm w/o schedlock,
+ // runtime·NumCgoCall() iterates over allm w/o schedlock,
// so we need to publish it safely.
runtime·atomicstorep(&runtime·allm, m);
}
@@ -1652,7 +1652,7 @@ runtime·mid(uint32 ret)
}
void
-runtime·Goroutines(int32 ret)
+runtime·NumGoroutine(int32 ret)
{
ret = runtime·sched.gcount;
FLUSH(&ret);