use the actual go source instead.
R=r
DELTA=90 (66 added, 18 deleted, 6 changed)
OCL=28708
CL=28719
y.tab.c: y.tab.h
test -f y.tab.c && touch y.tab.c
-builtin.c: sys.go unsafe.go runtime.go mkbuiltin1.c mkbuiltin
+builtin.c: sys.go unsafe.go mkbuiltin1.c mkbuiltin
./mkbuiltin >builtin.c || \
(echo 'mkbuiltin failed; using bootstrap copy of builtin.c'; cp builtin.c.boot builtin.c)
"func unsafe.Unreflect (? uint64, ? string, ? bool) (ret interface { })\n"
"\n"
"$$\n";
-char *runtimeimport =
- "package runtime\n"
- "func runtime.Breakpoint ()\n"
- "func runtime.Gosched ()\n"
- "func runtime.Goexit ()\n"
- "func runtime.Caller (n int) (pc uint64, file string, line int, ok bool)\n"
- "\n"
- "$$\n";
EXTERN int tptr; // either TPTR32 or TPTR64
extern char* sysimport;
extern char* unsafeimport;
-extern char* runtimeimport;
EXTERN char* filename; // name to uniqify names
EXTERN Idir* idirs;
cannedimports("unsafe.6", unsafeimport);
return;
}
- if(strcmp(f->u.sval->s, "runtime") == 0) {
- cannedimports("runtime.6", runtimeimport);
- return;
- }
if(!findpkg(f->u.sval))
fatal("can't find import: %Z", f->u.sval);
set -e
gcc -o mkbuiltin1 mkbuiltin1.c
rm -f _builtin.c
-for i in sys unsafe runtime
+for i in sys unsafe
do
6g $i.go
./mkbuiltin1 $i >>_builtin.c
+++ /dev/null
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package PACKAGE
-func Breakpoint();
-func Gosched();
-func Goexit();
-func Caller(n int) (pc uint64, file string, line int, ok bool);
exec.install: os.install strings.install
exvar.install: fmt.install http.install log.install strconv.install sync.install
flag.install: fmt.install os.install strconv.install
-log.install: fmt.install io.install os.install time.install
+log.install: fmt.install io.install os.install runtime.install time.install
path.install: io.install
once.install: sync.install
strings.install: utf8.install
-testing.install: flag.install fmt.install
+testing.install: flag.install fmt.install runtime.install
fmt.install: io.install reflect.install strconv.install
GODEPS=fmt.install io.install once.install regexp.install sort.install \
# TODO(rsc): net is not supposed to depend on fmt or strings or strconv
net.install: fmt.install once.install os.install strconv.install strings.install
os.install: syscall.install once.install
-regexp.install: os.install
+regexp.install: os.install runtime.install
reflect.install: strconv.install sync.install
strconv.install: math.install os.install utf8.install
sync.install:
syscall.install: sync.install
tabwriter.install: os.install io.install container/vector.install
-template.install: container/vector.install fmt.install io.install os.install reflect.install strings.install
+template.install: container/vector.install fmt.install io.install os.install reflect.install runtime.install strings.install
time.install: once.install os.install io.install
once.install os.install sort.install strings.install sync.install template.install time.install \
--- /dev/null
+# Copyright 2009 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# DO NOT EDIT. Automatically generated by gobuild.
+# gobuild -m >Makefile
+
+D=
+
+O_arm=5
+O_amd64=6
+O_386=8
+OS=568vq
+
+O=$(O_$(GOARCH))
+GC=$(O)g -I_obj
+CC=$(O)c -FVw
+AS=$(O)a
+AR=6ar
+
+default: packages
+
+clean:
+ rm -rf *.[$(OS)] *.a [$(OS)].out _obj
+
+test: packages
+ gotest
+
+coverage: packages
+ gotest
+ 6cov -g `pwd` | grep -v '_test\.go:'
+
+%.$O: %.go
+ $(GC) $*.go
+
+%.$O: %.c
+ $(CC) $*.c
+
+%.$O: %.s
+ $(AS) $*.s
+
+O1=\
+ runtime.$O\
+
+
+phases: a1
+_obj$D/runtime.a: phases
+
+a1: $(O1)
+ $(AR) grc _obj$D/runtime.a runtime.$O
+ rm -f $(O1)
+
+
+newpkg: clean
+ mkdir -p _obj$D
+ $(AR) grc _obj$D/runtime.a
+
+$(O1): newpkg
+$(O2): a1
+
+nuke: clean
+ rm -f $(GOROOT)/pkg$D/runtime.a
+
+packages: _obj$D/runtime.a
+
+install: packages
+ test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg$D
+ cp _obj$D/runtime.a $(GOROOT)/pkg$D/runtime.a
*/
package runtime
+// These functions are implemented in the base runtime library, ../../runtime/.
+
// Gosched yields the processor, allowing other goroutines to run. It does not
// suspend the current goroutine, so execution resumes automatically.
func Gosched()