]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: rename Cgocalls and Goroutines to NumCgoCall and NumGoroutine, respectively.
authorDavid Symonds <dsymonds@golang.org>
Thu, 16 Feb 2012 21:49:41 +0000 (08:49 +1100)
committerDavid Symonds <dsymonds@golang.org>
Thu, 16 Feb 2012 21:49:41 +0000 (08:49 +1100)
Update some other docs too.

Update #2955.

R=rsc
CC=golang-dev
https://golang.org/cl/5676060

src/pkg/net/http/transport_test.go
src/pkg/runtime/cgocall.c
src/pkg/runtime/debug.go
src/pkg/runtime/extern.go
src/pkg/runtime/proc.c

index a36571a44468ce7c08ce9d58201e95bc939d6f14..1a629c1727c5282bb888c2eee998caf2ac20d1e2 100644 (file)
@@ -648,7 +648,7 @@ func TestTransportPersistConnLeak(t *testing.T) {
        tr := &Transport{}
        c := &Client{Transport: tr}
 
-       n0 := runtime.Goroutines()
+       n0 := runtime.NumGoroutine()
 
        const numReq = 25
        didReqCh := make(chan bool)
@@ -669,7 +669,7 @@ func TestTransportPersistConnLeak(t *testing.T) {
                <-gotReqCh
        }
 
-       nhigh := runtime.Goroutines()
+       nhigh := runtime.NumGoroutine()
 
        // Tell all handlers to unblock and reply.
        for i := 0; i < numReq; i++ {
@@ -685,7 +685,7 @@ func TestTransportPersistConnLeak(t *testing.T) {
        time.Sleep(100 * time.Millisecond)
        runtime.GC()
        runtime.GC() // even more.
-       nfinal := runtime.Goroutines()
+       nfinal := runtime.NumGoroutine()
 
        growth := nfinal - n0
 
index 756eff38f7ad14e172e8972b1fc67bf8d22eaca4..7a26538ec89d4259498b7df1f6665c1a566e0997 100644 (file)
@@ -151,7 +151,7 @@ unlockm(void)
 }
 
 void
-runtime·Cgocalls(int64 ret)
+runtime·NumCgoCall(int64 ret)
 {
        M *m;
 
index bd6dcc971a1a4a37f91785599854b23b73ce5477..861017d5ffce1ff54dda551ac1256d6ec4ca4c33 100644 (file)
@@ -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.
index eafa2f19f19e929ddbaf17617ad49922eba602bd..42caeb0df33e778b46ffc4d79fdf382b448a7151 100644 (file)
@@ -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
index 3dbf77a105d9fbb2ed4638ae476a6565095d4f4d..d9047c92c15429118434e87a406b1c8bb787a788 100644 (file)
@@ -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);