Message ID | 20211001153347.1736014-11-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | nios2: Enable cross compile and fix signals | expand |
Le 01/10/2021 à 17:33, Richard Henderson a écrit : > Using do_sigprocmask directly was incorrect, as it will > leave the signal blocked by the outer layers of linux-user. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/nios2/signal.c | 2 +- > linux-user/signal.c | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c > index 80e3d42fc9..517cd39270 100644 > --- a/linux-user/nios2/signal.c > +++ b/linux-user/nios2/signal.c > @@ -205,7 +205,7 @@ long do_rt_sigreturn(CPUNios2State *env) > } > > target_to_host_sigset(&set, &frame->uc.tuc_sigmask); > - do_sigprocmask(SIG_SETMASK, &set, NULL); > + set_sigmask(&set); > > if (rt_restore_ucontext(env, &frame->uc, &rval)) { > goto badframe; > diff --git a/linux-user/signal.c b/linux-user/signal.c > index 2038216455..5ec63cd092 100644 > --- a/linux-user/signal.c > +++ b/linux-user/signal.c > @@ -252,7 +252,6 @@ int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset) > return 0; > } > > -#if !defined(TARGET_NIOS2) > /* Just set the guest's signal mask to the specified value; the > * caller is assumed to have called block_signals() already. > */ > @@ -262,7 +261,6 @@ void set_sigmask(const sigset_t *set) > > ts->signal_mask = *set; > } > -#endif > > /* sigaltstack management */ > > Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c index 80e3d42fc9..517cd39270 100644 --- a/linux-user/nios2/signal.c +++ b/linux-user/nios2/signal.c @@ -205,7 +205,7 @@ long do_rt_sigreturn(CPUNios2State *env) } target_to_host_sigset(&set, &frame->uc.tuc_sigmask); - do_sigprocmask(SIG_SETMASK, &set, NULL); + set_sigmask(&set); if (rt_restore_ucontext(env, &frame->uc, &rval)) { goto badframe; diff --git a/linux-user/signal.c b/linux-user/signal.c index 2038216455..5ec63cd092 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -252,7 +252,6 @@ int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset) return 0; } -#if !defined(TARGET_NIOS2) /* Just set the guest's signal mask to the specified value; the * caller is assumed to have called block_signals() already. */ @@ -262,7 +261,6 @@ void set_sigmask(const sigset_t *set) ts->signal_mask = *set; } -#endif /* sigaltstack management */
Using do_sigprocmask directly was incorrect, as it will leave the signal blocked by the outer layers of linux-user. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/nios2/signal.c | 2 +- linux-user/signal.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.25.1