]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: make more build-friendly
authorRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 20:33:58 +0000 (15:33 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 20:33:58 +0000 (15:33 -0500)
Collapse the arch,os-specific directories into the main directory
by renaming xxx/foo.c to foo_xxx.c, and so on.

There are no substantial edits here, except to the Makefile.
The assumption is that the Go tool will #define GOOS_darwin
and GOARCH_amd64 and will make any file named something
like signals_darwin.h available as signals_GOOS.h during the
build.  This replaces what used to be done with -I$(GOOS).

There is still work to be done to make runtime build with
standard tools, but this is a big step.  After this we will have
to write a script to generate all the generated files so they
can be checked in (instead of generated during the build).

R=r, iant, r, lucio.dere
CC=golang-dev
https://golang.org/cl/5490053

141 files changed:
src/pkg/runtime/Makefile
src/pkg/runtime/arch_386.h [moved from src/pkg/runtime/386/arch.h with 100% similarity]
src/pkg/runtime/arch_amd64.h [moved from src/pkg/runtime/amd64/arch.h with 100% similarity]
src/pkg/runtime/arch_arm.h [moved from src/pkg/runtime/arm/arch.h with 100% similarity]
src/pkg/runtime/asm_386.s [moved from src/pkg/runtime/386/asm.s with 99% similarity]
src/pkg/runtime/asm_amd64.s [moved from src/pkg/runtime/amd64/asm.s with 99% similarity]
src/pkg/runtime/asm_arm.s [moved from src/pkg/runtime/arm/asm.s with 99% similarity]
src/pkg/runtime/atomic_386.c [moved from src/pkg/runtime/386/atomic.c with 100% similarity]
src/pkg/runtime/atomic_amd64.c [moved from src/pkg/runtime/amd64/atomic.c with 100% similarity]
src/pkg/runtime/atomic_arm.c [moved from src/pkg/runtime/arm/atomic.c with 100% similarity]
src/pkg/runtime/callback_windows_386.c [moved from src/pkg/runtime/windows/386/callback.c with 97% similarity]
src/pkg/runtime/callback_windows_amd64.c [moved from src/pkg/runtime/windows/amd64/callback.c with 97% similarity]
src/pkg/runtime/cgocall.c
src/pkg/runtime/closure_386.c [moved from src/pkg/runtime/386/closure.c with 100% similarity]
src/pkg/runtime/closure_amd64.c [moved from src/pkg/runtime/amd64/closure.c with 100% similarity]
src/pkg/runtime/closure_arm.c [moved from src/pkg/runtime/arm/closure.c with 100% similarity]
src/pkg/runtime/cpuprof.c
src/pkg/runtime/defs1_linux.go [moved from src/pkg/runtime/linux/defs1.go with 100% similarity]
src/pkg/runtime/defs2_linux.go [moved from src/pkg/runtime/linux/defs2.go with 100% similarity]
src/pkg/runtime/defs_arm_linux.go [moved from src/pkg/runtime/linux/defs_arm.go with 100% similarity]
src/pkg/runtime/defs_darwin.go [moved from src/pkg/runtime/darwin/defs.go with 100% similarity]
src/pkg/runtime/defs_darwin_386.h [moved from src/pkg/runtime/darwin/386/defs.h with 100% similarity]
src/pkg/runtime/defs_darwin_amd64.h [moved from src/pkg/runtime/darwin/amd64/defs.h with 100% similarity]
src/pkg/runtime/defs_freebsd.go [moved from src/pkg/runtime/freebsd/defs.go with 100% similarity]
src/pkg/runtime/defs_freebsd_386.h [moved from src/pkg/runtime/freebsd/386/defs.h with 100% similarity]
src/pkg/runtime/defs_freebsd_amd64.h [moved from src/pkg/runtime/freebsd/amd64/defs.h with 100% similarity]
src/pkg/runtime/defs_linux.go [moved from src/pkg/runtime/linux/defs.go with 100% similarity]
src/pkg/runtime/defs_linux_386.h [moved from src/pkg/runtime/linux/386/defs.h with 100% similarity]
src/pkg/runtime/defs_linux_amd64.h [moved from src/pkg/runtime/linux/amd64/defs.h with 100% similarity]
src/pkg/runtime/defs_linux_arm.h [moved from src/pkg/runtime/linux/arm/defs.h with 100% similarity]
src/pkg/runtime/defs_netbsd.go [moved from src/pkg/runtime/netbsd/defs.go with 100% similarity]
src/pkg/runtime/defs_netbsd_386.h [moved from src/pkg/runtime/netbsd/386/defs.h with 100% similarity]
src/pkg/runtime/defs_netbsd_amd64.h [moved from src/pkg/runtime/netbsd/amd64/defs.h with 100% similarity]
src/pkg/runtime/defs_openbsd.go [moved from src/pkg/runtime/openbsd/defs.go with 100% similarity]
src/pkg/runtime/defs_openbsd_386.h [moved from src/pkg/runtime/openbsd/386/defs.h with 100% similarity]
src/pkg/runtime/defs_openbsd_amd64.h [moved from src/pkg/runtime/openbsd/amd64/defs.h with 100% similarity]
src/pkg/runtime/defs_plan9_386.h [moved from src/pkg/runtime/plan9/386/defs.h with 100% similarity]
src/pkg/runtime/defs_windows.go [moved from src/pkg/runtime/windows/defs.go with 100% similarity]
src/pkg/runtime/defs_windows_386.h [moved from src/pkg/runtime/windows/386/defs.h with 100% similarity]
src/pkg/runtime/defs_windows_amd64.h [moved from src/pkg/runtime/windows/amd64/defs.h with 100% similarity]
src/pkg/runtime/iface.c
src/pkg/runtime/malloc.goc
src/pkg/runtime/mcache.c
src/pkg/runtime/mcentral.c
src/pkg/runtime/mem_darwin.c [moved from src/pkg/runtime/darwin/mem.c with 93% similarity]
src/pkg/runtime/mem_freebsd.c [moved from src/pkg/runtime/freebsd/mem.c with 95% similarity]
src/pkg/runtime/mem_linux.c [moved from src/pkg/runtime/linux/mem.c with 97% similarity]
src/pkg/runtime/mem_netbsd.c [moved from src/pkg/runtime/openbsd/mem.c with 95% similarity]
src/pkg/runtime/mem_openbsd.c [moved from src/pkg/runtime/netbsd/mem.c with 95% similarity]
src/pkg/runtime/mem_plan9.c [moved from src/pkg/runtime/plan9/mem.c with 96% similarity]
src/pkg/runtime/mem_windows.c [moved from src/pkg/runtime/windows/mem.c with 95% similarity]
src/pkg/runtime/memmove_386.s [moved from src/pkg/runtime/386/memmove.s with 100% similarity]
src/pkg/runtime/memmove_amd64.s [moved from src/pkg/runtime/amd64/memmove.s with 100% similarity]
src/pkg/runtime/memmove_arm.s [moved from src/pkg/runtime/arm/memmove.s with 100% similarity]
src/pkg/runtime/memset_arm.s [moved from src/pkg/runtime/arm/memset.s with 100% similarity]
src/pkg/runtime/mfinal.c
src/pkg/runtime/mfixalloc.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/mheap.c
src/pkg/runtime/mprof.goc
src/pkg/runtime/msize.c
src/pkg/runtime/os_darwin.h [moved from src/pkg/runtime/darwin/os.h with 100% similarity]
src/pkg/runtime/os_freebsd.h [moved from src/pkg/runtime/freebsd/os.h with 100% similarity]
src/pkg/runtime/os_linux.h [moved from src/pkg/runtime/linux/os.h with 100% similarity]
src/pkg/runtime/os_netbsd.h [moved from src/pkg/runtime/netbsd/os.h with 100% similarity]
src/pkg/runtime/os_openbsd.h [moved from src/pkg/runtime/openbsd/os.h with 100% similarity]
src/pkg/runtime/os_plan9.h [moved from src/pkg/runtime/plan9/os.h with 100% similarity]
src/pkg/runtime/os_windows.h [moved from src/pkg/runtime/windows/os.h with 100% similarity]
src/pkg/runtime/proc.c
src/pkg/runtime/rt0_darwin_386.s [moved from src/pkg/runtime/darwin/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_darwin_amd64.s [moved from src/pkg/runtime/darwin/amd64/rt0.s with 100% similarity]
src/pkg/runtime/rt0_freebsd_386.s [moved from src/pkg/runtime/freebsd/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_freebsd_amd64.s [moved from src/pkg/runtime/freebsd/amd64/rt0.s with 100% similarity]
src/pkg/runtime/rt0_linux_386.s [moved from src/pkg/runtime/linux/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_linux_amd64.s [moved from src/pkg/runtime/linux/amd64/rt0.s with 100% similarity]
src/pkg/runtime/rt0_linux_arm.s [moved from src/pkg/runtime/linux/arm/rt0.s with 100% similarity]
src/pkg/runtime/rt0_netbsd_386.s [moved from src/pkg/runtime/netbsd/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_netbsd_amd64.s [moved from src/pkg/runtime/netbsd/amd64/rt0.s with 100% similarity]
src/pkg/runtime/rt0_openbsd_386.s [moved from src/pkg/runtime/openbsd/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_openbsd_amd64.s [moved from src/pkg/runtime/openbsd/amd64/rt0.s with 100% similarity]
src/pkg/runtime/rt0_plan9_386.s [moved from src/pkg/runtime/plan9/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_windows_386.s [moved from src/pkg/runtime/windows/386/rt0.s with 100% similarity]
src/pkg/runtime/rt0_windows_amd64.s [moved from src/pkg/runtime/windows/amd64/rt0.s with 93% similarity]
src/pkg/runtime/runtime.h
src/pkg/runtime/sema.goc
src/pkg/runtime/signal_darwin_386.c [moved from src/pkg/runtime/darwin/386/signal.c with 98% similarity]
src/pkg/runtime/signal_darwin_amd64.c [moved from src/pkg/runtime/darwin/amd64/signal.c with 98% similarity]
src/pkg/runtime/signal_freebsd_386.c [moved from src/pkg/runtime/freebsd/386/signal.c with 98% similarity]
src/pkg/runtime/signal_freebsd_amd64.c [moved from src/pkg/runtime/freebsd/amd64/signal.c with 98% similarity]
src/pkg/runtime/signal_linux_386.c [moved from src/pkg/runtime/linux/386/signal.c with 98% similarity]
src/pkg/runtime/signal_linux_amd64.c [moved from src/pkg/runtime/linux/amd64/signal.c with 98% similarity]
src/pkg/runtime/signal_linux_arm.c [moved from src/pkg/runtime/linux/arm/signal.c with 98% similarity]
src/pkg/runtime/signal_netbsd_386.c [moved from src/pkg/runtime/openbsd/386/signal.c with 98% similarity]
src/pkg/runtime/signal_netbsd_amd64.c [moved from src/pkg/runtime/netbsd/amd64/signal.c with 98% similarity]
src/pkg/runtime/signal_openbsd_386.c [moved from src/pkg/runtime/netbsd/386/signal.c with 98% similarity]
src/pkg/runtime/signal_openbsd_amd64.c [moved from src/pkg/runtime/openbsd/amd64/signal.c with 98% similarity]
src/pkg/runtime/signal_plan9_386.c [moved from src/pkg/runtime/plan9/386/signal.c with 100% similarity]
src/pkg/runtime/signal_windows_386.c [moved from src/pkg/runtime/windows/386/signal.c with 97% similarity]
src/pkg/runtime/signal_windows_amd64.c [moved from src/pkg/runtime/windows/amd64/signal.c with 98% similarity]
src/pkg/runtime/signals_darwin.h [moved from src/pkg/runtime/darwin/signals.h with 100% similarity]
src/pkg/runtime/signals_freebsd.h [moved from src/pkg/runtime/freebsd/signals.h with 100% similarity]
src/pkg/runtime/signals_linux.h [moved from src/pkg/runtime/linux/signals.h with 100% similarity]
src/pkg/runtime/signals_netbsd.h [moved from src/pkg/runtime/netbsd/signals.h with 100% similarity]
src/pkg/runtime/signals_openbsd.h [moved from src/pkg/runtime/openbsd/signals.h with 100% similarity]
src/pkg/runtime/signals_plan9.h [moved from src/pkg/runtime/plan9/signals.h with 100% similarity]
src/pkg/runtime/signals_windows.h [moved from src/pkg/runtime/windows/signals.h with 100% similarity]
src/pkg/runtime/sigqueue.goc
src/pkg/runtime/slice.c
src/pkg/runtime/softfloat_arm.c [moved from src/pkg/runtime/arm/softfloat.c with 100% similarity]
src/pkg/runtime/stack.h
src/pkg/runtime/string.goc
src/pkg/runtime/symtab.c
src/pkg/runtime/sys_darwin_386.s [moved from src/pkg/runtime/darwin/386/sys.s with 99% similarity]
src/pkg/runtime/sys_darwin_amd64.s [moved from src/pkg/runtime/darwin/amd64/sys.s with 99% similarity]
src/pkg/runtime/sys_freebsd_386.s [moved from src/pkg/runtime/freebsd/386/sys.s with 99% similarity]
src/pkg/runtime/sys_freebsd_amd64.s [moved from src/pkg/runtime/freebsd/amd64/sys.s with 99% similarity]
src/pkg/runtime/sys_linux_386.s [moved from src/pkg/runtime/linux/386/sys.s with 99% similarity]
src/pkg/runtime/sys_linux_amd64.s [moved from src/pkg/runtime/linux/amd64/sys.s with 99% similarity]
src/pkg/runtime/sys_linux_arm.s [moved from src/pkg/runtime/linux/arm/sys.s with 99% similarity]
src/pkg/runtime/sys_netbsd_386.s [moved from src/pkg/runtime/netbsd/386/sys.s with 99% similarity]
src/pkg/runtime/sys_netbsd_amd64.s [moved from src/pkg/runtime/netbsd/amd64/sys.s with 99% similarity]
src/pkg/runtime/sys_openbsd_386.s [moved from src/pkg/runtime/openbsd/386/sys.s with 99% similarity]
src/pkg/runtime/sys_openbsd_amd64.s [moved from src/pkg/runtime/openbsd/amd64/sys.s with 99% similarity]
src/pkg/runtime/sys_plan9_386.s [moved from src/pkg/runtime/plan9/386/sys.s with 96% similarity]
src/pkg/runtime/sys_windows_386.s [moved from src/pkg/runtime/windows/386/sys.s with 99% similarity]
src/pkg/runtime/sys_windows_amd64.s [moved from src/pkg/runtime/windows/amd64/sys.s with 99% similarity]
src/pkg/runtime/syscall_windows.goc [moved from src/pkg/runtime/windows/syscall.goc with 99% similarity]
src/pkg/runtime/thread_darwin.c [moved from src/pkg/runtime/darwin/thread.c with 99% similarity]
src/pkg/runtime/thread_freebsd.c [moved from src/pkg/runtime/freebsd/thread.c with 98% similarity]
src/pkg/runtime/thread_linux.c [moved from src/pkg/runtime/linux/thread.c with 98% similarity]
src/pkg/runtime/thread_netbsd.c [moved from src/pkg/runtime/netbsd/thread.c with 98% similarity]
src/pkg/runtime/thread_openbsd.c [moved from src/pkg/runtime/openbsd/thread.c with 98% similarity]
src/pkg/runtime/thread_plan9.c [moved from src/pkg/runtime/plan9/thread.c with 98% similarity]
src/pkg/runtime/thread_windows.c [moved from src/pkg/runtime/windows/thread.c with 99% similarity]
src/pkg/runtime/time.goc
src/pkg/runtime/traceback_amd64.c [moved from src/pkg/runtime/amd64/traceback.c with 99% similarity]
src/pkg/runtime/traceback_arm.c [moved from src/pkg/runtime/arm/traceback.c with 99% similarity]
src/pkg/runtime/vlop_386.s [moved from src/pkg/runtime/386/vlop.s with 100% similarity]
src/pkg/runtime/vlop_arm.s [moved from src/pkg/runtime/arm/vlop.s with 100% similarity]
src/pkg/runtime/vlrt_386.c [moved from src/pkg/runtime/386/vlrt.c with 100% similarity]
src/pkg/runtime/vlrt_arm.c [moved from src/pkg/runtime/arm/vlrt.c with 100% similarity]

index c390040c45b0bcc291a7d23e45aa94f0e7e91f70..9fb3a2bbe78c403232a2f157f810b7e0fa2bf05a 100644 (file)
@@ -4,16 +4,10 @@
 
 include ../../Make.inc
 
-TARG=runtime
-
-# Set SIZE to 32 or 64.
-SIZE_386=32
-SIZE_amd64=64
-SIZE_arm=32
-SIZE=$(SIZE_$(GOARCH))
+# Go tool will do this for package runtime.
+CFLAGS+=-DGOOS_$(GOOS) -DGOARCH_$(GOARCH)
 
-CFLAGS_windows=-D__WINDOWS__
-CFLAGS=-I$(GOOS) -I$(GOARCH) -I$(GOOS)/$(GOARCH) -FVw $(CFLAGS_$(GOARCH)) $(CFLAGS_$(GOOS))
+TARG=runtime
 
 GOFILES=\
        debug.go\
@@ -49,29 +43,29 @@ OFILES_plan9=\
        lock_sema.$O\
 
 OFILES_windows=\
-       callback.$O\
+       callback_windows_$(GOARCH).$O\
        lock_sema.$O\
-       syscall.$O\
+       syscall_windows.$O\
 
 # 386-specific object files
 OFILES_386=\
-       vlop.$O\
-       vlrt.$O\
+       vlop_386.$O\
+       vlrt_386.$O\
 
 # arm-specific object files
 OFILES_arm=\
-       memset.$O\
-       softfloat.$O\
-       vlop.$O\
-       vlrt.$O\
+       memset_arm.$O\
+       softfloat_arm.$O\
+       vlop_arm.$O\
+       vlrt_arm.$O\
 
 OFILES=\
        alg.$O\
-       asm.$O\
-       atomic.$O\
+       asm_$(GOARCH).$O\
+       atomic_$(GOARCH).$O\
        cgocall.$O\
        chan.$O\
-       closure.$O\
+       closure_$(GOARCH).$O\
        complex.$O\
        cpuprof.$O\
        float.$O\
@@ -80,8 +74,8 @@ OFILES=\
        malloc.$O\
        mcache.$O\
        mcentral.$O\
-       mem.$O\
-       memmove.$O\
+       mem_$(GOOS).$O\
+       memmove_$(GOARCH).$O\
        mfinal.$O\
        mfixalloc.$O\
        mgc0.$O\
@@ -90,33 +84,36 @@ OFILES=\
        msize.$O\
        print.$O\
        proc.$O\
-       rt0.$O\
+       rt0_$(GOOS)_$(GOARCH).$O\
        rune.$O\
        runtime.$O\
        runtime1.$O\
        sema.$O\
-       signal.$O\
+       signal_$(GOOS)_$(GOARCH).$O\
        sigqueue.$O\
        slice.$O\
        string.$O\
        symtab.$O\
-       sys.$O\
-       thread.$O\
+       sys_$(GOOS)_$(GOARCH).$O\
+       thread_$(GOOS).$O\
        time.$O\
-       traceback.$O\
+       traceback_$(GOARCH).$O\
        $(OFILES_$(GOARCH))\
        $(OFILES_$(GOOS))\
 
+AUTOHFILES=\
+       arch_GOARCH.h\
+       os_GOOS.h\
+       signals_GOOS.h\
+       defs_GOOS_GOARCH.h\
+
 HFILES=\
        cgocall.h\
        runtime.h\
        hashmap.h\
        malloc.h\
        stack.h\
-       $(GOARCH)/asm.h\
-       $(GOOS)/os.h\
-       $(GOOS)/signals.h\
-       $(GOOS)/$(GOARCH)/defs.h\
+       $(AUTOHFILES)\
 
 GOFILES+=$(GOFILES_$(GOOS))
 
@@ -135,9 +132,9 @@ $(pkgdir)/%.h: %.h
 clean: clean-local
 
 clean-local:
-       rm -f goc2c mkversion version.go */asm.h runtime.acid.* runtime_defs.go $$(ls *.goc | sed 's/goc$$/c/')
+       rm -f goc2c mkversion version.go runtime.acid.* runtime_defs.go $$(ls *.goc | sed 's/goc$$/c/') $(AUTOHFILES)
 
-$(GOARCH)/asm.h: mkasmh.sh runtime.acid.$(GOARCH)
+asm_$(GOARCH).h: mkasmh.sh runtime.acid.$(GOARCH)
        ./mkasmh.sh >$@.x
        mv -f $@.x $@
 
@@ -160,20 +157,7 @@ version_$(GOOS).go:
        ./goc2c "`pwd`/$<" > $@.tmp
        mv -f $@.tmp $@
 
-%.$O:  $(GOARCH)/%.c $(HFILES)
-       $(CC) $(CFLAGS) $<
-
-%.$O:  $(GOOS)/%.c $(HFILES)
-       $(CC) $(CFLAGS) $<
-
-%.$O:  $(GOOS)/$(GOARCH)/%.c $(HFILES)
-       $(CC) $(CFLAGS) $<
-
-%.$O:  $(GOARCH)/%.s $(GOARCH)/asm.h
-       $(AS) $<
-
-%.$O:  $(GOOS)/$(GOARCH)/%.s $(GOARCH)/asm.h
-       $(AS) $<
+%.$O: asm_$(GOARCH).h
 
 # for discovering offsets inside structs when debugging
 runtime.acid.$(GOARCH): runtime.h proc.c
@@ -185,6 +169,18 @@ traceback.$O:      amd64/traceback.c
        $(CC) $(CFLAGS) $<
 endif
 
-runtime_defs.go: proc.c iface.c hashmap.c chan.c
-       CC="$(CC)" CFLAGS="$(CFLAGS)" ./mkgodefs.sh $^ > $@.x
+runtime_defs.go: proc.c iface.c hashmap.c chan.c $(HFILES)
+       CC="$(CC)" CFLAGS="$(CFLAGS)" ./mkgodefs.sh proc.c iface.c hashmap.c chan.c > $@.x
        mv -f $@.x $@
+
+arch_GOARCH.h: arch_$(GOARCH).h
+       cp $^ $@
+
+defs_GOOS_GOARCH.h: defs_$(GOOS)_$(GOARCH).h
+       cp $^ $@
+
+os_GOOS.h: os_$(GOOS).h
+       cp $^ $@
+
+signals_GOOS.h: signals_$(GOOS).h
+       cp $^ $@
similarity index 99%
rename from src/pkg/runtime/386/asm.s
rename to src/pkg/runtime/asm_386.s
index 04d4e214c3462a0e3c010cd2ae8d97a2c3bc74ea..c39f365d5959f104c1f1ad299ad10de69d4e0e07 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "386/asm.h"
+#include "asm_386.h"
 
 TEXT _rt0_386(SB),7,$0
        // Linux, Windows start the FPU in extended double precision.
similarity index 99%
rename from src/pkg/runtime/amd64/asm.s
rename to src/pkg/runtime/asm_amd64.s
index 18cdefb83dc0954e72ea19b310a2c6bec32ccfa6..d91421e9e364829c27fcccd352b06f8fc28614fd 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 TEXT _rt0_amd64(SB),7,$-8
        // copy arguments forward on an even stack
similarity index 99%
rename from src/pkg/runtime/arm/asm.s
rename to src/pkg/runtime/asm_arm.s
index c03422f10c8118d48c798b8bc66f16ad7def7eed..533c0744d7455a27a03ab81bd3bf3963007abf95 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "arm/asm.h"
+#include "asm_arm.h"
 
 // using frame size $-4 means do not save LR on stack.
 TEXT _rt0_arm(SB),7,$-4
similarity index 97%
rename from src/pkg/runtime/windows/386/callback.c
rename to src/pkg/runtime/callback_windows_386.c
index 11b3d294d9a8bbac20d5a09eb76f3a2747f597e7..fcd292fbcdacb783b4acf7858997186eeecc2140 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "runtime.h"
 #include "type.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 
 // Will keep all callbacks in a linked list, so they don't get garbage collected.
 typedef        struct  Callback        Callback;
similarity index 97%
rename from src/pkg/runtime/windows/amd64/callback.c
rename to src/pkg/runtime/callback_windows_amd64.c
index f6fde4fb889fab1390898d5712844d471b1ee034..99d7cb9e38fdca12e6bb2081127def083a146d85 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "runtime.h"
 #include "type.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 
 // Will keep all callbacks in a linked list, so they don't get garbage collected.
 typedef        struct  Callback        Callback;
index 4fdb912fa9c2400a3485b9c8715018c0572d5947..b6f23302e4fd783fc8b5056f50fcc1a61207918e 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "stack.h"
 #include "cgocall.h"
 
index b7cf1343849b80687d8e65ab603dbb4dfa512560..05fa0cf61ad9c0cbf5faa48217730d97ce0626c0 100644 (file)
@@ -49,7 +49,7 @@
 // in the situation when normally the goroutine "owns" handoff.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 enum
index c9d020fbebeb69c9127b62db7ad0c8807c85312f..9f709355a8b3790544a75ab189b7bb628a483189 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "type.h"
 #include "malloc.h"
 
index 2f6f8091274919872da844bf5968783c28845b4d..b71f5e433004cae7e7e947b2a660ff294650ec77 100644 (file)
@@ -8,10 +8,10 @@
 
 package runtime
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "stack.h"
 #include "malloc.h"
-#include "defs.h"
+#include "defs_GOOS_GOARCH.h"
 #include "type.h"
 
 MHeap runtime·mheap;
index b6e1c507a668523986bb16d4077bee629364aa15..518e00c123d755d8f44412a31e225781e768a800 100644 (file)
@@ -7,7 +7,7 @@
 // See malloc.h for an overview.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 void*
index 8463d4eb88e9492655b354b6a8241e805f29db18..ff0c2d11ad32ed6e22da3514d54e09478923602a 100644 (file)
@@ -15,7 +15,7 @@
 // so that it is faster to move those lists between MCaches and MCentrals.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 static bool MCentral_Grow(MCentral *c);
similarity index 93%
rename from src/pkg/runtime/darwin/mem.c
rename to src/pkg/runtime/mem_darwin.c
index 2fbd7a0c479f027eeda781cc175d461036f838bb..3af7af99ae94a277338faab825b645778f2431ca 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "defs.h"
-#include "os.h"
+#include "arch_GOARCH.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "malloc.h"
 
 void*
similarity index 95%
rename from src/pkg/runtime/freebsd/mem.c
rename to src/pkg/runtime/mem_freebsd.c
index b69bbdc6ec672739760245419b15584e94846a6f..d1c22583dc8a390a703f70f5b5bab9f00c86c159 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "defs.h"
-#include "os.h"
+#include "arch_GOARCH.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "malloc.h"
 
 void*
similarity index 97%
rename from src/pkg/runtime/linux/mem.c
rename to src/pkg/runtime/mem_linux.c
index 62e4eda2c252ef44ab22dcf3d16917e6acf2cec7..fdf02c2cac8a0a8f8a3e72987577e0bc88f3a737 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "defs.h"
-#include "os.h"
+#include "arch_GOARCH.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "malloc.h"
 
 enum
similarity index 95%
rename from src/pkg/runtime/openbsd/mem.c
rename to src/pkg/runtime/mem_netbsd.c
index dea503877148552a01a5c9b234f3dcabd1ef3469..34ff31d9085c3a36978169fa67c1ed3176f3759a 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "defs.h"
-#include "os.h"
+#include "arch_GOARCH.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "malloc.h"
 
 enum
similarity index 95%
rename from src/pkg/runtime/netbsd/mem.c
rename to src/pkg/runtime/mem_openbsd.c
index dea503877148552a01a5c9b234f3dcabd1ef3469..34ff31d9085c3a36978169fa67c1ed3176f3759a 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "defs.h"
-#include "os.h"
+#include "arch_GOARCH.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "malloc.h"
 
 enum
similarity index 96%
rename from src/pkg/runtime/plan9/mem.c
rename to src/pkg/runtime/mem_plan9.c
index af8b9f14e78548d26d4a3dc2caccaa52305f1bb3..15cbc176b675a37876a0b1dbfcc1d88e2f598298 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
-#include "os.h"
+#include "os_GOOS.h"
 
 extern byte end[];
 static byte *bloc = { end };
similarity index 95%
rename from src/pkg/runtime/windows/mem.c
rename to src/pkg/runtime/mem_windows.c
index f95a1a98259a59a12f89b01541a8fa6a7a9eac10..7840daa22c379c28ccbe75023805997ea0c1e0b4 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "os.h"
-#include "defs.h"
+#include "arch_GOARCH.h"
+#include "os_GOOS.h"
+#include "defs_GOOS_GOARCH.h"
 #include "malloc.h"
 
 enum {
index efb42e1fbd1edacca2c33420ea76a84d8ebfa0b2..c6f2b54219ffe9c258424883ec3486c2d589a757 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 enum { debug = 0 };
index 497b5bf1325561f4f177316ad9e3fb10e05038d8..c916d588fdfd292a059d4760ebd11cd52d4e02f3 100644 (file)
@@ -7,7 +7,7 @@
 // See malloc.h for overview.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 // Initialize f to allocate objects of the given size,
index 89bad668fec33c8af5b5f3dade4b657aea52612b..b2f22866def89e097d3f74b9c09e03733a8f7b13 100644 (file)
@@ -5,7 +5,7 @@
 // Garbage collector.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 #include "stack.h"
 
index ed2b248de69b453c4e6a9b5e31c0a23577262bf4..d75c18d828ae9d13b30e37aeb77c9d1f518a575f 100644 (file)
@@ -13,7 +13,7 @@
 // and heapmap(i) == span for all s->start <= i < s->start+s->npages.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 static MSpan *MHeap_AllocLocked(MHeap*, uintptr, int32);
index 57923b846ce67e10271f4f80cca56457ba831df0..b297d41389d2578d93f581926165eb0ce6c2a36f 100644 (file)
@@ -7,9 +7,9 @@
 
 package runtime
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
-#include "defs.h"
+#include "defs_GOOS_GOARCH.h"
 #include "type.h"
 
 // NOTE(rsc): Everything here could use cas if contention became an issue.
index 5e4735a74492e23a98d520d80e5e9b5fd70ae9d1..e6cfcdb02d8eb7cc0aa374af7ed2897c2acb58af 100644 (file)
@@ -26,7 +26,7 @@
 // TODO(rsc): Compute max waste for any given size.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 int32 runtime·class_to_size[NumSizeClasses];
index 8f4d1ffb4c6f94786094a2346072420dd1ebec4c..cb45a0c2992c2c1cc768ef2c1464b42b83ec6ee7 100644 (file)
@@ -3,10 +3,10 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
-#include "defs.h"
+#include "arch_GOARCH.h"
+#include "defs_GOOS_GOARCH.h"
 #include "malloc.h"
-#include "os.h"
+#include "os_GOOS.h"
 #include "stack.h"
 
 bool   runtime·iscgo;
similarity index 93%
rename from src/pkg/runtime/windows/amd64/rt0.s
rename to src/pkg/runtime/rt0_windows_amd64.s
index 35978bc74627a3d943487d44df430cdf757bca04..5dc6b6e51bf01c14906375a882a9f3590ad0991a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 TEXT   _rt0_amd64_windows(SB),7,$-8
        MOVQ    $_rt0_amd64(SB), AX
index 3bcb0cd008528e6b585bde8632637687d17e23fb..7ab7a3fdd603f3b34775dc76a01b9e8b173d09e4 100644 (file)
@@ -241,7 +241,7 @@ struct      M
        uint32  waitsemacount;
        uint32  waitsemalock;
 
-#ifdef __WINDOWS__
+#ifdef GOOS_windows
        void*   thread;         // thread handle
 #endif
        uintptr end[];
@@ -299,7 +299,7 @@ struct      WinCall
        uintptr err;    // error number
 };
 
-#ifdef __WINDOWS__
+#ifdef GOOS_windows
 enum {
    Windows = 1
 };
index 9f3f4a2b39fe35853a1a8d73aee7cfa899a7e73d..67c90350b6d49f98e94d0964539921d9b5fd172a 100644 (file)
@@ -19,7 +19,7 @@
 
 package runtime
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 
 typedef struct Sema Sema;
 struct Sema
similarity index 98%
rename from src/pkg/runtime/darwin/386/signal.c
rename to src/pkg/runtime/signal_darwin_386.c
index 95c48b258362a516f8fa4a0a2a784348a219983e..c1cab2ccaa54a1227ef20b5baac4aa15e750826e 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
-#include "signals.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
+#include "signals_GOOS.h"
 
 void
 runtime·dumpregs(Regs32 *r)
similarity index 98%
rename from src/pkg/runtime/darwin/amd64/signal.c
rename to src/pkg/runtime/signal_darwin_amd64.c
index c0ef89fc60de677e0e60d5440a9c8e8d785c8fa8..fd75e78454ceec31857c509b233f8dd8525ec117 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
-#include "signals.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
+#include "signals_GOOS.h"
 
 void
 runtime·dumpregs(Regs64 *r)
similarity index 98%
rename from src/pkg/runtime/freebsd/386/signal.c
rename to src/pkg/runtime/signal_freebsd_386.c
index 2fe7ecd70726247c0d9efb2f693403b7d065d4fa..ff4aaabdb540c1a1b06aec320c1be6679a0fbc1d 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 extern void runtime·sigtramp(void);
 
similarity index 98%
rename from src/pkg/runtime/freebsd/amd64/signal.c
rename to src/pkg/runtime/signal_freebsd_amd64.c
index 8015e366e63d5ffcf3db4deac5ad071004355f68..2683f4fd09831ae3e5003e2b35d7df5f87c48a50 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 extern void runtime·sigtramp(void);
 
similarity index 98%
rename from src/pkg/runtime/linux/386/signal.c
rename to src/pkg/runtime/signal_linux_386.c
index 4045b2efc3a4bc53e213ae55e913e16afe2cf53f..4f3abcebb32cc83b860763a386ec2ce88ffc6a2f 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 void
 runtime·dumpregs(Sigcontext *r)
similarity index 98%
rename from src/pkg/runtime/linux/amd64/signal.c
rename to src/pkg/runtime/signal_linux_amd64.c
index ee90271ed2e2b01704458d7f1635dcc33fe66681..937d5c34789adf9933d95a03fe81759ba3663cba 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 void
 runtime·dumpregs(Sigcontext *r)
similarity index 98%
rename from src/pkg/runtime/linux/arm/signal.c
rename to src/pkg/runtime/signal_linux_arm.c
index 88a84d1120a4a66e6dfb4d647cb02fd551b007f5..b32ec7a226402e0cc4ede478a4b6b3389d525180 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 void
 runtime·dumpregs(Sigcontext *r)
similarity index 98%
rename from src/pkg/runtime/openbsd/386/signal.c
rename to src/pkg/runtime/signal_netbsd_386.c
index 8b0d4ac61693271ba26a0d643ec9525f67f4b17d..74fa1d490bb442f7e71aa2e0c2e0e99858f13916 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 extern void runtime·sigtramp(void);
 
similarity index 98%
rename from src/pkg/runtime/netbsd/amd64/signal.c
rename to src/pkg/runtime/signal_netbsd_amd64.c
index 01bc76d207bed8e6b2bf92824b3ebadabf4a0ce2..6c69fa73390ba811e50bf549b628f1b3d25c4344 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 extern void runtime·sigtramp(void);
 
similarity index 98%
rename from src/pkg/runtime/netbsd/386/signal.c
rename to src/pkg/runtime/signal_openbsd_386.c
index 8b0d4ac61693271ba26a0d643ec9525f67f4b17d..74fa1d490bb442f7e71aa2e0c2e0e99858f13916 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 extern void runtime·sigtramp(void);
 
similarity index 98%
rename from src/pkg/runtime/openbsd/amd64/signal.c
rename to src/pkg/runtime/signal_openbsd_amd64.c
index 01bc76d207bed8e6b2bf92824b3ebadabf4a0ce2..6c69fa73390ba811e50bf549b628f1b3d25c4344 100644 (file)
@@ -3,9 +3,9 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "signals.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "signals_GOOS.h"
+#include "os_GOOS.h"
 
 extern void runtime·sigtramp(void);
 
similarity index 97%
rename from src/pkg/runtime/windows/386/signal.c
rename to src/pkg/runtime/signal_windows_386.c
index 8d049c9f326da5d23266d5f95313b81e2dd67df5..48d2a8bff9d43017f0481ca87b03cf39da089a16 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 
 void
 runtime·dumpregs(Context *r)
similarity index 98%
rename from src/pkg/runtime/windows/amd64/signal.c
rename to src/pkg/runtime/signal_windows_amd64.c
index 97106c8b844471c89e7942aac9fe3771f08bd834..92cdb8054ffbbbc61961bc71f48a6c737a67873e 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 
 extern void *runtime·sigtramp;
 
index 504590a54e66a4d6daeeb8de9a4ba380a132cfbc..3c12e5caf5170c2950102c9757846e9f313a238a 100644 (file)
@@ -38,7 +38,7 @@
 
 package runtime
 #include "runtime.h"
-#include "defs.h"
+#include "defs_GOOS_GOARCH.h"
 
 static struct {
        Note;
index 3bc5cff080c366aed38c53305ff9a9a6a960e586..e5726c93b90be15fdec0574d521556dfcdaf477b 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "type.h"
 #include "malloc.h"
 
index 483233876a5f4c3400cf37daa2e76e65a461b216..f56dac120f5f254f1be63654543b21651e67e554 100644 (file)
@@ -57,7 +57,7 @@ enum {
        // to each stack below the usual guard area for OS-specific
        // purposes like signal handling. Used on Windows because
        // it does not use a separate stack.
-#ifdef __WINDOWS__
+#ifdef GOOS_windows
        StackSystem = 512 * sizeof(uintptr),
 #else
        StackSystem = 0,
index 0e2dddda347b34de05b0de75e5a5bd5b132d1072..7e1f8a1e8bf908caf1a514769cca38659b94e2cb 100644 (file)
@@ -4,7 +4,7 @@
 
 package runtime
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 String runtime·emptystring;
index d0468c6dd454e5289a849611ca742c5fc686a01a..6cd59136f426fcf94f44cd6f373edc10221c19e6 100644 (file)
@@ -13,9 +13,9 @@
 // and figure out exactly what we want.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
-#include "arch.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
+#include "arch_GOARCH.h"
 
 extern byte pclntab[], epclntab[], symtab[], esymtab[];
 
similarity index 99%
rename from src/pkg/runtime/darwin/386/sys.s
rename to src/pkg/runtime/sys_darwin_386.s
index 426367b9e2edc9988460643bfb05ca186db9e200..9a513468a0cf2ef043d55aaac6ded0ccb81029b1 100644 (file)
@@ -6,7 +6,7 @@
 // See http://fxr.watson.org/fxr/source/bsd/kern/syscalls.c?v=xnu-1228
 // or /usr/include/sys/syscall.h (on a Mac) for system call numbers.
 
-#include "386/asm.h"
+#include "asm_386.h"
 
 TEXT runtime·notok(SB),7,$0
        MOVL    $0xf1, 0xf1
similarity index 99%
rename from src/pkg/runtime/darwin/amd64/sys.s
rename to src/pkg/runtime/sys_darwin_amd64.s
index 5a504e3ecf4f42f93c59b7042fc91b6dc09edb9c..ac777656c54e29c207f9ad4d75ce13e9022e90e9 100644 (file)
@@ -11,7 +11,7 @@
 // The high 8 bits specify the kind of system call: 1=Mach, 2=BSD, 3=Machine-Dependent.
 //
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 // Exit the entire program (like C exit)
 TEXT runtime·exit(SB),7,$0
similarity index 99%
rename from src/pkg/runtime/freebsd/386/sys.s
rename to src/pkg/runtime/sys_freebsd_386.s
index 41134ad61f0b993d8926e358e3598910ac4405f2..9833784efce9417e5b79200590fc61ca3e83dd06 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "386/asm.h"
+#include "asm_386.h"
        
 TEXT runtime·sys_umtx_op(SB),7,$-4
        MOVL    $454, AX
similarity index 99%
rename from src/pkg/runtime/freebsd/amd64/sys.s
rename to src/pkg/runtime/sys_freebsd_amd64.s
index bd63650236fde6d7c2581ab55d547ba4313304f8..991c33c8254f0de05f937246dd3a9c6d86473a15 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
        
 TEXT runtime·sys_umtx_op(SB),7,$0
        MOVQ 8(SP), DI
similarity index 99%
rename from src/pkg/runtime/linux/386/sys.s
rename to src/pkg/runtime/sys_linux_386.s
index d96c022d36eccb80b91b906ce858586478116552..1763143f9e3486eff5a35a30ff57b7e5e3a49d5f 100644 (file)
@@ -6,7 +6,7 @@
 // System calls and other sys.stuff for 386, Linux
 //
 
-#include "386/asm.h"
+#include "asm_386.h"
 
 TEXT runtime·exit(SB),7,$0
        MOVL    $252, AX        // syscall number
similarity index 99%
rename from src/pkg/runtime/linux/amd64/sys.s
rename to src/pkg/runtime/sys_linux_amd64.s
index 76bb48c75a924d216f9997495f67606914f1dd16..d55518686caf5da0801af624e9aa3f65d676e907 100644 (file)
@@ -6,7 +6,7 @@
 // System calls and other sys.stuff for AMD64, Linux
 //
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 TEXT runtime·exit(SB),7,$0-8
        MOVL    8(SP), DI
similarity index 99%
rename from src/pkg/runtime/linux/arm/sys.s
rename to src/pkg/runtime/sys_linux_arm.s
index 14ea337d02efb95f9c7d201c996e98cfe2dd5693..d0b36dedf958f8bbc303d8514d9e48f35e2a6604 100644 (file)
@@ -6,7 +6,7 @@
 // System calls and other sys.stuff for arm, Linux
 //
 
-#include "arm/asm.h"
+#include "asm_arm.h"
 
 // OABI
 //#define SYS_BASE 0x00900000
similarity index 99%
rename from src/pkg/runtime/netbsd/386/sys.s
rename to src/pkg/runtime/sys_netbsd_386.s
index 20ed09a6b5710e0cbfc7e683c2c4249260d81c26..bcb4fc5e719e3078cc4aa9fd2357b2f3befb1462 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "386/asm.h"
+#include "asm_386.h"
 
 // Exit the entire program (like C exit)
 TEXT runtime·exit(SB),7,$-4
similarity index 99%
rename from src/pkg/runtime/netbsd/amd64/sys.s
rename to src/pkg/runtime/sys_netbsd_amd64.s
index 693b51dff13d0956fc6e6c1693cdd34d6876e288..20817711fba7c7bca9542817455fb5749c82ed36 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 // int64 rfork_thread(int32 flags, void *stack, M *m, G *g, void (*fn)(void));
 TEXT runtime·rfork_thread(SB),7,$0
similarity index 99%
rename from src/pkg/runtime/openbsd/386/sys.s
rename to src/pkg/runtime/sys_openbsd_386.s
index 2b1be7ee6bbc36c5b82aa50ea9862092c6d952a6..ae3275c852ff6d841a490c0cce8255a73a786575 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "386/asm.h"
+#include "asm_386.h"
 
 // Exit the entire program (like C exit)
 TEXT runtime·exit(SB),7,$-4
similarity index 99%
rename from src/pkg/runtime/openbsd/amd64/sys.s
rename to src/pkg/runtime/sys_openbsd_amd64.s
index 9c2d403b25a4a60f4942f8f3762bcc04fa9335c2..f568ba4312c303fbf7a181ef22f945f9d7c61860 100644 (file)
@@ -6,7 +6,7 @@
 // /usr/src/sys/kern/syscalls.master for syscall numbers.
 //
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 // int64 rfork_thread(int32 flags, void *stack, M *m, G *g, void (*fn)(void));
 TEXT runtime·rfork_thread(SB),7,$0
similarity index 96%
rename from src/pkg/runtime/plan9/386/sys.s
rename to src/pkg/runtime/sys_plan9_386.s
index 97be276be6336d80ddb8f25def6ccc25d0495519..8c773eee9df6d419cdd76fcad2f50b6893900976 100644 (file)
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "defs.h"
-#include "386/asm.h"
+#include "defs_GOOS_GOARCH.h"
+#include "asm_386.h"
 
 // setldt(int entry, int address, int limit)
 TEXT runtime·setldt(SB),7,$0
similarity index 99%
rename from src/pkg/runtime/windows/386/sys.s
rename to src/pkg/runtime/sys_windows_386.s
index 69b9b82e828ddecacbeeab2f4bb7643eaf2ca44d..307b93d5c7efa9dd99d47ddd35f94a774f040f2f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "386/asm.h"
+#include "asm_386.h"
 
 // void runtime·asmstdcall(void *c);
 TEXT runtime·asmstdcall(SB),7,$0
similarity index 99%
rename from src/pkg/runtime/windows/amd64/sys.s
rename to src/pkg/runtime/sys_windows_amd64.s
index a1e36fe1328058047f236dd0610ae368f53bd147..508759ff8ff71e34d3519803a6e491ac4d76c296 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "amd64/asm.h"
+#include "asm_amd64.h"
 
 // maxargs should be divisible by 2, as Windows stack
 // must be kept 16-byte aligned on syscall entry.
similarity index 99%
rename from src/pkg/runtime/windows/syscall.goc
rename to src/pkg/runtime/syscall_windows.goc
index d97a6cafd6ddac5b9674110e7b57775e9798cf31..781ec908d0644f64b358f23f53edb53e95cff8b9 100644 (file)
@@ -4,7 +4,7 @@
 
 package syscall
 #include "runtime.h"
-#include "os.h"
+#include "os_GOOS.h"
 #include "cgocall.h"
 
 func loadlibrary(filename *uint16) (handle uintptr, err uintptr) {
similarity index 99%
rename from src/pkg/runtime/darwin/thread.c
rename to src/pkg/runtime/thread_darwin.c
index 4665408725b8b63fcfd0cca49143ada11cff2bd5..12e79afda033c0aeb1653de9f93b7e0fc2799265 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "stack.h"
 
 extern SigTab runtime·sigtab[];
similarity index 98%
rename from src/pkg/runtime/freebsd/thread.c
rename to src/pkg/runtime/thread_freebsd.c
index 48532f6afc7eb10216439d5e8aec6a8dfb6fc3ba..779782ac9690488c446eaf22891abe29d8ade4eb 100644 (file)
@@ -2,8 +2,8 @@
 // license that can be found in the LICENSE file.`
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "stack.h"
 
 extern SigTab runtime·sigtab[];
similarity index 98%
rename from src/pkg/runtime/linux/thread.c
rename to src/pkg/runtime/thread_linux.c
index 5502bbbcab87cdd46a05ac95d259bc0d2563da9f..d72e9cb43525da199b252a046f0c5b002a1c839f 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "stack.h"
 
 extern SigTab runtime·sigtab[];
similarity index 98%
rename from src/pkg/runtime/netbsd/thread.c
rename to src/pkg/runtime/thread_netbsd.c
index 3824a4f1b4015b76ef6f369d130221ee9143fcae..0aba02720e0160f81573201c06ccc3b0e06657f7 100644 (file)
@@ -2,8 +2,8 @@
 // license that can be found in the LICENSE file.`
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "stack.h"
 
 enum
similarity index 98%
rename from src/pkg/runtime/openbsd/thread.c
rename to src/pkg/runtime/thread_openbsd.c
index 55ca64b80be029a43a167431c3fb62cca7ccffa6..e1cd5bf2e416ac9c924cbe1ae8bd5a450a37e3a8 100644 (file)
@@ -2,8 +2,8 @@
 // license that can be found in the LICENSE file.`
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 #include "stack.h"
 
 enum
similarity index 98%
rename from src/pkg/runtime/plan9/thread.c
rename to src/pkg/runtime/thread_plan9.c
index 07edb717e45fc0354a467ef03b8e86dce039e8c0..a9b156d028d58ced5a708592975ac70d3e7ea591 100644 (file)
@@ -3,8 +3,8 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "os.h"
-#include "arch.h"
+#include "os_GOOS.h"
+#include "arch_GOARCH.h"
 
 int8 *goos = "plan9";
 
similarity index 99%
rename from src/pkg/runtime/windows/thread.c
rename to src/pkg/runtime/thread_windows.c
index dc7e06cd33675c8f4add7fa0f9c907cb2324aa6c..ad66c93a64e1e571736c60f0a9263dbedf33768e 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "runtime.h"
 #include "type.h"
-#include "defs.h"
-#include "os.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
 
 #pragma dynimport runtime·CloseHandle CloseHandle "kernel32.dll"
 #pragma dynimport runtime·CreateEvent CreateEventA "kernel32.dll"
index 8306e613585c5861623807d2a8b4e8421960cc16..a6b8352470030bf1379e16a9b1ed5b99f6701fc4 100644 (file)
@@ -7,9 +7,9 @@
 package time
 
 #include "runtime.h"
-#include "defs.h"
-#include "os.h"
-#include "arch.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 static Timers timers;
similarity index 99%
rename from src/pkg/runtime/amd64/traceback.c
rename to src/pkg/runtime/traceback_amd64.c
index fc9021e40e8ce6dca77c1604221fbf81f7947a0c..fedda797c2f2ba5b62f8757c9bb0e7fa83ed71aa 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 static uintptr isclosureentry(uintptr);
similarity index 99%
rename from src/pkg/runtime/arm/traceback.c
rename to src/pkg/runtime/traceback_arm.c
index 0319cdc9b6210ac38b5b5b4f8f4091f9b8db8505..22e0bc3a66377369e4b3645a308a419e8aac0d48 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 #include "runtime.h"
-#include "arch.h"
+#include "arch_GOARCH.h"
 #include "malloc.h"
 
 void runtime·deferproc(void);