|
runtime: implementation of callback functions for Windows, with split-stack handling
Avoids split-stack overflow from syscall by drawing new g0 split-stack boundaries on OS stack, then calling new scheduler in that space. This allows for further nesting of syscalls from a Go callback.
Important notes:
- builds on CL http://codereview.appspot.com/1696051 (updated to newer tip; included)
- experimental - especially no guarantees on stability when doing panic/recovery in callbacks (no research done)
I'd be more than happy to move the code to the 'exp' directory, but I'm not sure what's the best way to do that in this case, given the tight coupling with local code in proc.c + goc usage.
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+779 lines, -6 lines) |
Patch |
|
M |
.hgignore
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
src/pkg/exp/wingui/Makefile
|
View
|
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/pkg/exp/wingui/gui.go
|
View
|
|
1 chunk |
+157 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/pkg/exp/wingui/winapi.go
|
View
|
|
1 chunk |
+148 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/pkg/exp/wingui/zwinapi.go
|
View
|
|
1 chunk |
+214 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/darwin/thread.c
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/freebsd/thread.c
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/linux/thread.c
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/mgc0.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/pkg/runtime/plan9/thread.c
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/proc.c
|
View
|
|
6 chunks |
+75 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/runtime.h
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/pkg/runtime/tiny/thread.c
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/windows/386/sys.s
|
View
|
|
1 chunk |
+62 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/windows/os.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/windows/syscall.goc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/runtime/windows/thread.c
|
View
|
|
2 chunks |
+36 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/pkg/syscall/syscall_windows.go
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
Total messages: 9
|