From: Laurent Vivier <laurent@vivier.eu>
To: Taylor Simpson <tsimpson@quicinc.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Marlies Ruck <marlies.ruck@gmail.com>,
Riku Voipio <riku.voipio@iki.fi>,
Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
Josh Kunz <jkz@google.com>, Matus Kysel <mkysel@tachyum.com>,
"milos.stojanovic@rt-rk.com" <milos.stojanovic@rt-rk.com>
Subject: Re: [PATCH 2/4] linux-user: cleanup signal.c
Date: Tue, 4 Feb 2020 14:35:04 +0100 [thread overview]
Message-ID: <74a54fdb-6d2c-6912-55fa-b925e4c614d2@vivier.eu> (raw)
In-Reply-To: <BYAPR02MB48863971CD9E073FB98B130CDE000@BYAPR02MB4886.namprd02.prod.outlook.com>
Le 03/02/2020 à 23:58, Taylor Simpson a écrit :
>
>
>> -----Original Message-----
>> From: Laurent Vivier <laurent@vivier.eu>
>> Sent: Saturday, February 1, 2020 6:28 AM
>> To: qemu-devel@nongnu.org
>> Cc: Josh Kunz <jkz@google.com>; milos.stojanovic@rt-rk.com; Matus Kysel
>> <mkysel@tachyum.com>; Aleksandar Markovic <aleksandar.markovic@rt-
>> rk.com>; Marlies Ruck <marlies.ruck@gmail.com>; Laurent Vivier
>> <laurent@vivier.eu>; Peter Maydell <peter.maydell@linaro.org>; Taylor
>> Simpson <tsimpson@quicinc.com>; Riku Voipio <riku.voipio@iki.fi>
>> Subject: [PATCH 2/4] linux-user: cleanup signal.c
>>
>> -------------------------------------------------------------------------
>> CAUTION: This email originated from outside of the organization.
>> -------------------------------------------------------------------------
>>
>> No functionnal changes. Prepare the field for future fixes.
>
>
> Spelling error
Sorry, french word. Will be changed by "functional"
>
>>
>> Remove memset(.., 0, ...) that is useless on a static array
>>
>> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
>> ---
>> linux-user/signal.c | 37 ++++++++++++++++++++++---------------
>> 1 file changed, 22 insertions(+), 15 deletions(-)
>>
>> diff --git a/linux-user/signal.c b/linux-user/signal.c index
>> 5ca6d62b15d3..f42a2e1a82a5 100644
>> --- a/linux-user/signal.c
>> +++ b/linux-user/signal.c
>> @@ -66,12 +66,6 @@ static uint8_t host_to_target_signal_table[_NSIG] = {
>> [SIGPWR] = TARGET_SIGPWR,
>> [SIGSYS] = TARGET_SIGSYS,
>> /* next signals stay the same */
>> - /* Nasty hack: Reverse SIGRTMIN and SIGRTMAX to avoid overlap with
>> - host libpthread signals. This assumes no one actually uses SIGRTMAX :-/
>> - To fix this properly we need to do manual signal delivery multiplexed
>> - over a single host signal. */
>> - [__SIGRTMIN] = __SIGRTMAX,
>> - [__SIGRTMAX] = __SIGRTMIN,
>> };
>> static uint8_t target_to_host_signal_table[_NSIG];
>>
>> @@ -480,13 +474,18 @@ static int core_dump_signal(int sig)
>> }
>> }
>>
>> -void signal_init(void)
>> +static void signal_table_init(void)
>> {
>> - TaskState *ts = (TaskState *)thread_cpu->opaque;
>> - struct sigaction act;
>> - struct sigaction oact;
>> int i, j;
>> - int host_sig;
>> +
>> + /*
>> + * Nasty hack: Reverse SIGRTMIN and SIGRTMAX to avoid overlap with
>> + * host libpthread signals. This assumes no one actually uses SIGRTMAX :-
>> /
>> + * To fix this properly we need to do manual signal delivery multiplexed
>> + * over a single host signal.
>> + */
>> + host_to_target_signal_table[__SIGRTMIN] = __SIGRTMAX;
>> + host_to_target_signal_table[__SIGRTMAX] = __SIGRTMIN;
>>
>> /* generate signal conversion tables */
>> for(i = 1; i < _NSIG; i++) {
>> @@ -497,14 +496,22 @@ void signal_init(void)
>> j = host_to_target_signal_table[i];
>
> Since you are cleaning up this code, let's give this a more descriptive name - target_sig would be consistent with host_sig used elsewhere.
I agree.
Thanks,
Laurent
next prev parent reply other threads:[~2020-02-04 13:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 12:27 [PATCH 0/4] linux-user: fix use of SIGRTMIN Laurent Vivier
2020-02-01 12:27 ` [PATCH 1/4] linux-user: add missing TARGET_SIGRTMIN for hppa Laurent Vivier
2020-02-01 12:27 ` [PATCH 2/4] linux-user: cleanup signal.c Laurent Vivier
2020-02-03 22:58 ` Taylor Simpson
2020-02-04 13:35 ` Laurent Vivier [this message]
2020-02-01 12:27 ` [PATCH 3/4] linux-user: fix TARGET_NSIG and _NSIG uses Laurent Vivier
2020-02-03 23:00 ` Taylor Simpson
2020-02-01 12:27 ` [PATCH 4/4] linux-user: fix use of SIGRTMIN Laurent Vivier
2020-02-03 23:15 ` Taylor Simpson
2020-02-04 13:38 ` Laurent Vivier
2020-02-03 22:50 ` [PATCH 0/4] " Taylor Simpson
2020-02-04 0:03 ` Josh Kunz
2020-02-04 11:55 ` Laurent Vivier
2020-02-05 2:00 ` Josh Kunz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74a54fdb-6d2c-6912-55fa-b925e4c614d2@vivier.eu \
--to=laurent@vivier.eu \
--cc=aleksandar.markovic@rt-rk.com \
--cc=jkz@google.com \
--cc=marlies.ruck@gmail.com \
--cc=milos.stojanovic@rt-rk.com \
--cc=mkysel@tachyum.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=tsimpson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).