]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove all badcallback() functions
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Wed, 29 May 2013 15:51:17 +0000 (17:51 +0200)
committerJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Wed, 29 May 2013 15:51:17 +0000 (17:51 +0200)
R=iant
CC=golang-dev
https://golang.org/cl/9738046

src/pkg/runtime/os_darwin.c
src/pkg/runtime/os_freebsd.c
src/pkg/runtime/os_linux.c
src/pkg/runtime/os_netbsd.c
src/pkg/runtime/os_openbsd.c
src/pkg/runtime/os_plan9.c
src/pkg/runtime/os_windows.c
src/pkg/runtime/sys_windows_386.s
src/pkg/runtime/sys_windows_amd64.s

index deb1c556a922cf0b43e9cded882ee49f7ab683b7..b28e805a825a9fbc5d9726ce7b6e44bb5e35fd5b 100644 (file)
@@ -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: ";
 
index 8c6e1b24964c780720e8e9dbda30bc34bcaecb01..efe82ca0721e110be1dc8f097f80383d5199b478 100644 (file)
@@ -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: ";
 
index 6bb376a7e9539280722b4eb6abc89f04d56d8fc0..2ae33af2d91be4d0f40c7a7b4d43deca8a930f43 100644 (file)
@@ -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: ";
 
index 3355208133956273a11773209aea4144848347ae..56ff188a630bad0ce0ffea27ff3086c67e02a709 100644 (file)
@@ -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: ";
 
index 898dca9b6ac591802e59b1000b0fc5d3b351133d..8c62886e9b33d6555eafef15e6700319f887fd31 100644 (file)
@@ -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: ";
 
index dd02eb878245c6bbf56b8575e3a1da1a6a990233..0991f81753cf921b125ee62d109ed4f19363697a 100644 (file)
@@ -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";
 
index 9b8e3e363a2e4dadca95cb3dc33d138a5f1cd619..60160c3e16a3fd5b4a9d64086454e59ccf0945e9 100644 (file)
@@ -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;
index 206cdccc4286f81b3e522e8817a47fdc964efabb..2c63b33850bdfcfcbbfd5c8eb2cee869b0f8fc11 100644 (file)
@@ -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)
index c20a268b1033c80540bbbbba9af641008b3ba861..b9eaec68d71263d266dba1ad757d6477a21900f2 100644 (file)
@@ -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