return ret;
}
+#if !defined(TARGET_OPENRISC) && !defined(TARGET_UNICORE32) && \
+ !defined(TARGET_X86_64)
+/* Just set the guest's signal mask to the specified value */
+static void set_sigmask(const sigset_t *set)
+{
+ do_sigprocmask(SIG_SETMASK, set, NULL);
+}
+#endif
+
/* siginfo conversion */
static inline void host_to_target_siginfo_noswap(target_siginfo_t *tinfo,
}
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
/* restore registers */
if (restore_sigcontext(env, &frame->sc))
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
goto badframe;
target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
if (restore_sigcontext(env, &frame->uc.tuc_mcontext)) {
goto badframe;
uint64_t pstate;
target_to_host_sigset(&set, &sf->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
for (i = 0; i < 31; i++) {
__get_user(env->xregs[i], &sf->uc.tuc_mcontext.regs[i]);
}
target_to_host_sigset_internal(&host_set, &set);
- do_sigprocmask(SIG_SETMASK, &host_set, NULL);
+ set_sigmask(&host_set);
if (restore_sigcontext(env, &frame->sc)) {
goto badframe;
abi_ulong *regspace;
target_to_host_sigset(&host_set, &uc->tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &host_set, NULL);
+ set_sigmask(&host_set);
if (restore_sigcontext(env, &uc->tuc_mcontext))
return 1;
}
target_to_host_sigset(&host_set, &frame->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &host_set, NULL);
+ set_sigmask(&host_set);
if (restore_sigcontext(env, &frame->uc.tuc_mcontext)) {
goto badframe;
}
target_to_host_sigset_internal(&host_set, &set);
- do_sigprocmask(SIG_SETMASK, &host_set, NULL);
+ set_sigmask(&host_set);
if (err) {
goto segv_and_exit;
}
}
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
}
env->pc = pc;
env->npc = npc;
}
target_to_host_sigset_internal(&blocked, &target_set);
- do_sigprocmask(SIG_SETMASK, &blocked, NULL);
+ set_sigmask(&blocked);
restore_sigcontext(regs, &frame->sf_sc);
}
target_to_host_sigset(&blocked, &frame->rs_uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &blocked, NULL);
+ set_sigmask(&blocked);
restore_sigcontext(env, &frame->rs_uc.tuc_mcontext);
goto badframe;
target_to_host_sigset_internal(&blocked, &target_set);
- do_sigprocmask(SIG_SETMASK, &blocked, NULL);
+ set_sigmask(&blocked);
restore_sigcontext(regs, &frame->sc);
}
target_to_host_sigset(&blocked, &frame->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &blocked, NULL);
+ set_sigmask(&blocked);
restore_sigcontext(regs, &frame->uc.tuc_mcontext);
__get_user(target_set.sig[i], &frame->extramask[i - 1]);
}
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
restore_sigcontext(&frame->uc.tuc_mcontext, env);
/* We got here through a sigreturn syscall, our path back is via an
__get_user(target_set.sig[i], &frame->extramask[i - 1]);
}
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
restore_sigcontext(&frame->sc, env);
unlock_user_struct(frame, frame_addr, 0);
__get_user(target_set.sig[0], &frame->sc.oldmask[0]);
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL); /* ~_BLOCKABLE? */
+ set_sigmask(&set); /* ~_BLOCKABLE? */
if (restore_sigregs(env, &frame->sregs)) {
goto badframe;
}
target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &set, NULL); /* ~_BLOCKABLE? */
+ set_sigmask(&set); /* ~_BLOCKABLE? */
if (restore_sigregs(env, &frame->uc.tuc_mcontext)) {
goto badframe;
__get_user(set.sig[1], &sc->_unused[3]);
#endif
target_to_host_sigset_internal(&blocked, &set);
- do_sigprocmask(SIG_SETMASK, &blocked, NULL);
+ set_sigmask(&blocked);
__get_user(sr_addr, &sc->regs);
if (!lock_user_struct(VERIFY_READ, sr, sr_addr, 1))
return 1;
target_to_host_sigset_internal(&blocked, &set);
- do_sigprocmask(SIG_SETMASK, &blocked, NULL);
+ set_sigmask(&blocked);
restore_user_regs(env, mcp, sig);
unlock_user_struct(mcp, mcp_addr, 1);
}
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
/* restore registers */
goto badframe;
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
/* restore registers */
__get_user(target_set.sig[0], &sc->sc_mask);
target_to_host_sigset_internal(&set, &target_set);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
restore_sigcontext(env, sc);
unlock_user_struct(sc, sc_addr, 0);
goto badframe;
}
target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
restore_sigcontext(env, &frame->uc.tuc_mcontext);
if (do_sigaltstack(frame_addr + offsetof(struct target_rt_sigframe,
goto badframe;
}
target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
- do_sigprocmask(SIG_SETMASK, &set, NULL);
+ set_sigmask(&set);
restore_sigcontext(env, &frame->uc.tuc_mcontext);
if (do_sigaltstack(frame_addr + offsetof(struct target_rt_sigframe,