diff options
| author | Russ Cox <rsc@golang.org> | 2014-11-15 08:00:38 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-11-15 08:00:38 -0500 |
| commit | 0fcf54b3d2bc42a947c65e9a520d078b671f8432 (patch) | |
| tree | 071014526059897ceef47c43e5a24ddc0a57b636 /src/runtime/debug.go | |
| parent | 9ef4e5610809780555260f386d6e20f3df87c6ce (diff) | |
| parent | 5fce15a2a3cd94427bb9979d73acf14013ec7f31 (diff) | |
| download | go-0fcf54b3d2bc42a947c65e9a520d078b671f8432.tar.xz | |
[dev.garbage] all: merge dev.cc into dev.garbage
The garbage collector is now written in Go.
There is plenty to clean up (just like on dev.cc).
all.bash passes on darwin/amd64, darwin/386, linux/amd64, linux/386.
TBR=rlh
R=austin, rlh, bradfitz
CC=golang-codereviews
https://golang.org/cl/173250043
Diffstat (limited to 'src/runtime/debug.go')
| -rw-r--r-- | src/runtime/debug.go | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 4414dd55d2..105b79cfef 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -6,18 +6,6 @@ package runtime import "unsafe" -// Breakpoint executes a breakpoint trap. -func Breakpoint() - -// LockOSThread wires the calling goroutine to its current operating system thread. -// Until the calling goroutine exits or calls UnlockOSThread, it will always -// execute in that thread, and no other goroutine can. -func LockOSThread() - -// UnlockOSThread unwires the calling goroutine from its fixed operating system thread. -// 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 and returns the previous setting. If n < 1, it does not // change the current setting. @@ -37,14 +25,14 @@ func GOMAXPROCS(n int) int { semacquire(&worldsema, false) gp := getg() gp.m.gcing = 1 - onM(stoptheworld) + systemstack(stoptheworld) // newprocs will be processed by starttheworld newprocs = int32(n) gp.m.gcing = 0 semrelease(&worldsema) - onM(starttheworld) + systemstack(starttheworld) return ret } @@ -66,5 +54,3 @@ func NumCgoCall() int64 { func NumGoroutine() int { return int(gcount()) } - -func gcount() int32 |
