summaryrefslogtreecommitdiff
path: root/libgo/runtime/sigqueue.goc
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/sigqueue.goc')
-rw-r--r--libgo/runtime/sigqueue.goc11
1 files changed, 8 insertions, 3 deletions
diff --git a/libgo/runtime/sigqueue.goc b/libgo/runtime/sigqueue.goc
index 8657216d3f4..6769b239dc3 100644
--- a/libgo/runtime/sigqueue.goc
+++ b/libgo/runtime/sigqueue.goc
@@ -107,9 +107,7 @@ func signal_recv() (m uint32) {
new = HASWAITER;
if(runtime_cas(&sig.state, old, new)) {
if (new == HASWAITER) {
- runtime_entersyscallblock();
- runtime_notesleep(&sig);
- runtime_exitsyscall();
+ runtime_notetsleepg(&sig, -1);
runtime_noteclear(&sig);
}
break;
@@ -157,3 +155,10 @@ func signal_disable(s uint32) {
sig.wanted[s/32] &= ~(1U<<(s&31));
runtime_sigdisable(s);
}
+
+// This runs on a foreign stack, without an m or a g. No stack split.
+void
+runtime_badsignal(int sig)
+{
+ __go_sigsend(sig);
+}