aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/extern.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-05-06 11:50:47 -0700
committerRob Pike <r@golang.org>2010-05-06 11:50:47 -0700
commiteb48bfbbdaf3a99dbb861f251a73a3b6ae45cc8b (patch)
tree8cb9b76a517a019f77bc2f00c2a7b2c59bf7c9c5 /src/pkg/runtime/extern.go
parent9088f9f245e432f9f87ae8cfe46b9d36dbcf1a2e (diff)
downloadgo-eb48bfbbdaf3a99dbb861f251a73a3b6ae45cc8b.tar.xz
runtime.GOMAXPROCS: hack it to have it return the old value.
R=rsc CC=golang-dev https://golang.org/cl/1140041
Diffstat (limited to 'src/pkg/runtime/extern.go')
-rw-r--r--src/pkg/runtime/extern.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go
index 1e284e8d71..72b43ae9bd 100644
--- a/src/pkg/runtime/extern.go
+++ b/src/pkg/runtime/extern.go
@@ -106,8 +106,10 @@ func LockOSThread()
func UnlockOSThread()
// GOMAXPROCS sets the maximum number of CPUs that can be executing
-// simultaneously. This call will go away when the scheduler improves.
-func GOMAXPROCS(n int)
+// simultaneously and returns the previous setting. If n < 1, it does not
+// change the current setting.
+// This call will go away when the scheduler improves.
+func GOMAXPROCS(n int) int
// Cgocalls returns the number of cgo calls made by the current process.
func Cgocalls() int64