qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 16/30] bsd-user/signal.c: host_to_target_siginfo_noswap


From: Warner Losh
Subject: Re: [PATCH 16/30] bsd-user/signal.c: host_to_target_siginfo_noswap
Date: Mon, 24 Jan 2022 14:45:31 -0700



On Sun, Jan 23, 2022 at 7:05 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 1/10/22 3:19 AM, Warner Losh wrote:
> +static inline void host_to_target_siginfo_noswap(target_siginfo_t *tinfo,
> +        const siginfo_t *info)
> +{
> +    int sig, code;
> +
> +    sig = host_to_target_signal(info->si_signo);

You now have a target signo, so...

> +    if (SIGILL == sig || SIGFPE == sig || SIGSEGV == sig || SIGBUS == sig ||
> +            SIGTRAP == sig) {

... you need TARGET_SIGFOO in the comparision.

Though, really, I think the categorization that Peter suggested is a better way to
structure this.

How about both? Both is good? I've reworked based on Peter's suggestion, but
still have a need to be careful about target vs host signal numbers. Thanks! I'd overlooked it.

Warner 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]