From: Thomas Huth <thuth@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, dgilbert@redhat.com
Subject: Re: [PATCH] tests/migration: use the common library function
Date: Mon, 11 Nov 2019 15:39:51 +0100 [thread overview]
Message-ID: <97fd0943-586c-035f-b33b-eb6b2eb3dde6@redhat.com> (raw)
In-Reply-To: <878soma4ev.fsf@linaro.org>
On 11/11/2019 15.11, Alex Bennée wrote:
>
> Thomas Huth <thuth@redhat.com> writes:
>
>> On 11/11/2019 13.55, Alex Bennée wrote:
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>
>> Could you please add at least a short patch description? (Why is this
>> change necessary / a good idea?)
>
> It's just a minor clean-up Dave happened to comment on last week. Using
> the helper function is preferable given it abstracts away any system
> differences for the same information.
But this also changes the behavior on non-Linux systems (i.e. the *BSDs
and macOS), since they will now use getpid() instead of gettid ... is
that the intended change here?
Thomas
>>> ---
>>> tests/migration/stress.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tests/migration/stress.c b/tests/migration/stress.c
>>> index 0c239646934..915389b53ae 100644
>>> --- a/tests/migration/stress.c
>>> +++ b/tests/migration/stress.c
>>> @@ -31,7 +31,7 @@ const char *argv0;
>>>
>>> static int gettid(void)
>>> {
>>> - return syscall(SYS_gettid);
>>> + return qemu_get_thread_id();
>>> }
>>>
>>> static __attribute__((noreturn)) void exit_failure(void)
>>>
>
>
> --
> Alex Bennée
>
next prev parent reply other threads:[~2019-11-11 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 12:55 [PATCH] tests/migration: use the common library function Alex Bennée
2019-11-11 13:07 ` Thomas Huth
2019-11-11 14:11 ` Alex Bennée
2019-11-11 14:39 ` Thomas Huth [this message]
2019-11-11 16:18 ` Peter Maydell
2019-11-11 17:02 ` Alex Bennée
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=97fd0943-586c-035f-b33b-eb6b2eb3dde6@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).