Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
acfb0a15
Commit
acfb0a15
authored
Aug 18, 2011
by
Wei Guangjing
Committed by
Russ Cox
Aug 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: ctrlhandler for windows amd64
R=rsc CC=golang-dev
https://golang.org/cl/4825047
parent
fca50820
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
signal.c
src/pkg/runtime/windows/amd64/signal.c
+1
-0
sys.s
src/pkg/runtime/windows/amd64/sys.s
+36
-2
No files found.
src/pkg/runtime/windows/amd64/signal.c
View file @
acfb0a15
...
...
@@ -9,6 +9,7 @@
void
runtime
·
initsig
(
int32
queue
)
{
runtime
·
siginit
();
}
void
...
...
src/pkg/runtime/windows/amd64/sys.s
View file @
acfb0a15
...
...
@@ -61,8 +61,42 @@ TEXT runtime·setlasterror(SB),7,$0
// Windows runs the ctrl handler in a new thread.
TEXT runtime·ctrlhandler(SB),7,$0
// TODO
RET
PUSHQ BP
MOVQ SP, BP
PUSHQ BX
PUSHQ SI
PUSHQ DI
PUSHQ 0x58(GS)
MOVQ SP, BX
// setup dummy m, g
SUBQ $(m_gostack+8), SP // at least space for m_gostack
LEAQ m_tls(SP), CX
MOVQ CX, 0x58(GS)
MOVQ SP, m(CX)
MOVQ SP, DX
SUBQ $16, SP // space for g_stack{guard,base}
MOVQ SP, g(CX)
MOVQ SP, m_g0(DX)
LEAQ -8192(SP), CX
MOVQ CX, g_stackguard(SP)
MOVQ BX, g_stackbase(SP)
PUSHQ 16(BP)
CALL runtime·ctrlhandler1(SB)
POPQ CX
get_tls(CX)
MOVQ g(CX), CX
MOVQ g_stackbase(CX), SP
POPQ 0x58(GS)
POPQ DI
POPQ SI
POPQ BX
POPQ BP
MOVQ 0(SP), CX
ADDQ $16, SP
JMP CX
TEXT runtime·callbackasm(SB),7,$0
// TODO
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment