Commit a3e0002e authored by Jan Ziak's avatar Jan Ziak

runtime: remove all badcallback() functions

R=iant
CC=golang-dev
https://golang.org/cl/9738046
parent d84132cc
......@@ -523,17 +523,6 @@ runtime·setprof(bool on)
runtime·sigprocmask(SIG_BLOCK, &sigset_prof, nil);
}
#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
#pragma textflag 7
void
runtime·badcallback(void)
{
runtime·write(2, badcallback, sizeof badcallback - 1);
}
#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
......
......@@ -235,17 +235,6 @@ runtime·setprof(bool on)
USED(on);
}
#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
#pragma textflag 7
void
runtime·badcallback(void)
{
runtime·write(2, badcallback, sizeof badcallback - 1);
}
#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
......
......@@ -284,17 +284,6 @@ runtime·setprof(bool on)
USED(on);
}
#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
#pragma textflag 7
void
runtime·badcallback(void)
{
runtime·write(2, badcallback, sizeof badcallback - 1);
}
#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
......
......@@ -275,17 +275,6 @@ runtime·setprof(bool on)
USED(on);
}
#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
#pragma textflag 7
void
runtime·badcallback(void)
{
runtime·write(2, badcallback, sizeof badcallback - 1);
}
#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
......
......@@ -257,17 +257,6 @@ runtime·setprof(bool on)
USED(on);
}
#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
#pragma textflag 7
void
runtime·badcallback(void)
{
runtime·write(2, badcallback, sizeof badcallback - 1);
}
#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
......
......@@ -330,17 +330,6 @@ runtime·setprof(bool on)
USED(on);
}
#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
#pragma textflag 7
void
runtime·badcallback(void)
{
runtime·pwrite(2, badcallback, sizeof badcallback - 1, -1LL);
}
#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go.\n";
......
......@@ -450,10 +450,6 @@ runtime·setprof(bool on)
USED(on);
}
#pragma dataflag 16 // no pointers
int8 runtime·badcallbackmsg[] = "runtime: cgo callback on thread not created by Go.\n";
int32 runtime·badcallbacklen = sizeof runtime·badcallbackmsg - 1;
#pragma dataflag 16 // no pointers
int8 runtime·badsignalmsg[] = "runtime: signal received on thread not created by Go.\n";
int32 runtime·badsignallen = sizeof runtime·badsignalmsg - 1;
......
......@@ -38,26 +38,6 @@ TEXT runtime·asmstdcall(SB),7,$0
RET
TEXT runtime·badcallback(SB),7,$24
// stderr
MOVL $-12, 0(SP)
MOVL SP, BP
CALL *runtime·GetStdHandle(SB)
MOVL BP, SP
MOVL AX, 0(SP) // handle
MOVL $runtime·badcallbackmsg(SB), DX // pointer
MOVL DX, 4(SP)
MOVL runtime·badcallbacklen(SB), DX // count
MOVL DX, 8(SP)
LEAL 20(SP), DX // written count
MOVL $0, 0(DX)
MOVL DX, 12(SP)
MOVL $0, 16(SP) // overlapped
CALL *runtime·WriteFile(SB)
MOVL BP, SI
RET
TEXT runtime·badsignal(SB),7,$24
// stderr
MOVL $-12, 0(SP)
......
......@@ -60,33 +60,6 @@ loadregs:
RET
// This should be called on a system stack,
// so we don't need to concern about split stack.
TEXT runtime·badcallback(SB),7,$0
SUBQ $48, SP
// stderr
MOVQ $-12, CX // stderr
MOVQ CX, 0(SP)
MOVQ runtime·GetStdHandle(SB), AX
CALL AX
MOVQ AX, CX // handle
MOVQ CX, 0(SP)
MOVQ $runtime·badcallbackmsg(SB), DX // pointer
MOVQ DX, 8(SP)
MOVL $runtime·badcallbacklen(SB), R8 // count
MOVQ R8, 16(SP)
LEAQ 40(SP), R9 // written count
MOVQ $0, 0(R9)
MOVQ R9, 24(SP)
MOVQ $0, 32(SP) // overlapped
MOVQ runtime·WriteFile(SB), AX
CALL AX
ADDQ $48, SP
RET
TEXT runtime·badsignal(SB),7,$48
// stderr
MOVQ $-12, CX // stderr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment