aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/extern.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-08-06 13:07:05 -0700
committerRob Pike <r@golang.org>2009-08-06 13:07:05 -0700
commit7955490de29ad5087904ce3a686243fe0230ac32 (patch)
treee27d755a466893114ce711ada8186c8f3826c85b /src/pkg/runtime/extern.go
parentae3939cb785a66b16190c6091568b471ca5c5297 (diff)
downloadgo-7955490de29ad5087904ce3a686243fe0230ac32.tar.xz
add runtime.GOMAXPROCS, allowing a program to, in effect, set $GOMAXPROCS
R=rsc DELTA=29 (28 added, 1 deleted, 0 changed) OCL=32829 CL=32837
Diffstat (limited to 'src/pkg/runtime/extern.go')
-rw-r--r--src/pkg/runtime/extern.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go
index 1f6561394c..d002e48136 100644
--- a/src/pkg/runtime/extern.go
+++ b/src/pkg/runtime/extern.go
@@ -40,3 +40,6 @@ func LockOSThread()
// If the calling goroutine has not called LockOSThread, UnlockOSThread is a no-op.
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)