summaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-03 11:11:16 -0400
committerRuss Cox <rsc@golang.org>2014-09-03 11:11:16 -0400
commit020cb222b8907f8eb18453a59f691e568a35522a (patch)
tree23ab7545fc195a5f4fa00b7448d9983d7339ea30 /src/cmd/api
parent772338a36fa4195ccd0fcf76fa0eb696d7c3dba0 (diff)
downloadgo-020cb222b8907f8eb18453a59f691e568a35522a.tar.gz
runtime: convert a few traceback-related functions from proc.c to traceback.go
They were in proc.c mainly because there was no portable traceback source file. As part of converting them to Go, move to traceback.go. In order to get access to the PC of _rt0_go, rename to runtime.rt0_go. LGTM=r R=golang-codereviews, r CC=dvyukov, golang-codereviews, iant, khr https://codereview.appspot.com/139110043
Diffstat (limited to 'src/cmd/api')
-rw-r--r--src/cmd/api/goapi.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index 8dec9e2cc..7f7b389be 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -405,7 +405,17 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
" wincallbackcontext struct{};" +
" _select struct{}; " +
"); " +
- "const ( cb_max = 2000 )"
+ "const (" +
+ " cb_max = 2000;" +
+ " _Gidle = 1;" +
+ " _Grunnable = 2;" +
+ " _Grunning = 3;" +
+ " _Gsyscall = 4;" +
+ " _Gwaiting = 5;" +
+ " _Gdead = 6;" +
+ " _Genqueue = 7;" +
+ " _Gcopystack = 8;" +
+ ")"
f, err = parser.ParseFile(fset, filename, src, 0)
if err != nil {
log.Fatalf("incorrect generated file: %s", err)