summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/thread_plan9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/thread_plan9.c')
-rw-r--r--src/pkg/runtime/thread_plan9.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pkg/runtime/thread_plan9.c b/src/pkg/runtime/thread_plan9.c
index aaed5050b..3b0dca69f 100644
--- a/src/pkg/runtime/thread_plan9.c
+++ b/src/pkg/runtime/thread_plan9.c
@@ -247,3 +247,23 @@ runtime·setprof(bool on)
{
USED(on);
}
+
+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);
+}
+
+static int8 badsignal[] = "runtime: signal received 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·badsignal(void)
+{
+ runtime·pwrite(2, badsignal, sizeof badsignal - 1, -1LL);
+}