|
runtime: refactor os-specific code
thread_GOOS.c becomes os_GOOS.c.
signal_GOOS_GOARCH.c becomes os_GOOS_GOARCH.c,
but with non-GOARCH-specific code moved into os_GOOS.c.
The actual arch-specific signal handler moves into signal_GOARCH.c
to avoid per-GOOS duplication.
New files signal_GOOS_GOARCH.h provide macros for
accessing fields of the very system-specific signal info structs.
Lots moving, but nothing changing.
This is a preliminarly cleanup so I can work on the signal
handling code to fix some open issues without having to
make each change 13 times.
Tested on Linux and OS X, 386 and amd64.
Will fix Plan 9, Windows, and ARM after the fact if necessary.
(Plan 9 and Windows should be fine; ARM will probably have some typos.)
Net effect: -1081 lines of code.
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+785 lines, -2107 lines) |
Patch |
 |
M |
src/cmd/dist/build.c
|
View
|
1
2
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_darwin.h
|
View
|
1
2
3
|
3 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_darwin.c
|
View
|
1
2
3
|
2 chunks |
+39 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_freebsd.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_freebsd.c
|
View
|
1
2
3
|
2 chunks |
+56 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_freebsd_arm.c
|
View
|
1
2
3
|
1 chunk |
+0 lines, -170 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_linux.h
|
View
|
1
2
3
|
2 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_linux.c
|
View
|
1
2
3
|
2 chunks |
+58 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_linux_386.c
|
View
|
1
2
3
|
1 chunk |
+0 lines, -143 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_linux_arm.c
|
View
|
1
2
3
|
1 chunk |
+0 lines, -159 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_netbsd.h
|
View
|
1
2
3
|
2 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_netbsd.c
|
View
|
1
2
3
|
2 chunks |
+56 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_netbsd_386.c
|
View
|
1
2
3
|
1 chunk |
+0 lines, -147 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_netbsd_amd64.c
|
View
|
1
2
3
|
1 chunk |
+0 lines, -154 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_netbsd_arm.c
|
View
|
1
2
3
|
1 chunk |
+0 lines, -176 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_openbsd.h
|
View
|
1
2
3
|
2 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_openbsd.c
|
View
|
1
2
3
|
2 chunks |
+53 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_plan9.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_plan9.c
|
View
|
1
2
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_plan9_386.c
|
View
|
1
2
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_plan9_amd64.c
|
View
|
1
2
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_windows.c
|
View
|
1
2
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_windows_386.c
|
View
|
1
2
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/os_windows_amd64.c
|
View
|
1
2
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/signal_386.c
|
View
|
1
2
|
4 chunks |
+52 lines, -88 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/signal_amd64.c
|
View
|
1
2
|
4 chunks |
+62 lines, -98 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/signal_arm.c
|
View
|
1
2
|
5 chunks |
+45 lines, -166 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_darwin_386.h
|
View
|
1
2
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_darwin_amd64.h
|
View
|
1
2
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_freebsd_386.h
|
View
|
1
2
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
R |
src/pkg/runtime/signal_freebsd_386.c
|
View
|
1
2
|
1 chunk |
+0 lines, -154 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_freebsd_amd64.h
|
View
|
1
2
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
R |
src/pkg/runtime/signal_freebsd_amd64.c
|
View
|
1
2
|
1 chunk |
+0 lines, -162 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_freebsd_arm.h
|
View
|
1
2
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_linux_386.h
|
View
|
1
2
3
4
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_linux_amd64.h
|
View
|
1
2
3
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
 |
R |
src/pkg/runtime/signal_linux_amd64.c
|
View
|
1
2
|
1 chunk |
+0 lines, -162 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_linux_arm.h
|
View
|
1
2
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_netbsd_386.h
|
View
|
1
2
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_netbsd_amd64.h
|
View
|
1
2
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_netbsd_arm.h
|
View
|
1
2
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_openbsd_386.h
|
View
|
1
2
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
R |
src/pkg/runtime/signal_openbsd_386.c
|
View
|
1
2
|
1 chunk |
+0 lines, -147 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_openbsd_amd64.h
|
View
|
1
2
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
R |
src/pkg/runtime/signal_openbsd_amd64.c
|
View
|
1
2
|
1 chunk |
+0 lines, -156 lines |
0 comments
|
Download
|
 |
A |
src/pkg/runtime/signal_unix.h
|
View
|
1
2
3
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/runtime/signal_unix.c
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 5
|