aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os1_dragonfly.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os1_dragonfly.go')
-rw-r--r--src/runtime/os1_dragonfly.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/runtime/os1_dragonfly.go b/src/runtime/os1_dragonfly.go
index f96c78ca80..da70014e55 100644
--- a/src/runtime/os1_dragonfly.go
+++ b/src/runtime/os1_dragonfly.go
@@ -119,6 +119,7 @@ func mpreinit(mp *m) {
mp.gsignal.m = mp
}
+//go:nosplit
func msigsave(mp *m) {
smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
@@ -127,6 +128,17 @@ func msigsave(mp *m) {
sigprocmask(_SIG_SETMASK, nil, smask)
}
+//go:nosplit
+func msigrestore(mp *m) {
+ smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
+ sigprocmask(_SIG_SETMASK, smask, nil)
+}
+
+//go:nosplit
+func sigblock() {
+ sigprocmask(_SIG_SETMASK, &sigset_all, nil)
+}
+
// Called to initialize a new m (including the bootstrap m).
// Called on the new thread, can not allocate memory.
func minit() {
@@ -150,9 +162,6 @@ func minit() {
// Called from dropm to undo the effect of an minit.
func unminit() {
- _g_ := getg()
- smask := (*sigset)(unsafe.Pointer(&_g_.m.sigmask))
- sigprocmask(_SIG_SETMASK, smask, nil)
signalstack(nil)
}
@@ -222,6 +231,7 @@ func getsig(i int32) uintptr {
return sa.sa_sigaction
}
+//go:nosplit
func signalstack(s *stack) {
var st sigaltstackt
if s == nil {