diff options
Diffstat (limited to 'src/pkg/runtime/thread_openbsd.c')
-rw-r--r-- | src/pkg/runtime/thread_openbsd.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pkg/runtime/thread_openbsd.c b/src/pkg/runtime/thread_openbsd.c index bee0c5755..d0f947210 100644 --- a/src/pkg/runtime/thread_openbsd.c +++ b/src/pkg/runtime/thread_openbsd.c @@ -213,3 +213,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·write(2, badcallback, sizeof badcallback - 1); +} + +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·write(2, badsignal, sizeof badsignal - 1); +} |