qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] tests/migration: use the common library function


From: Thomas Huth
Subject: Re: [PATCH] tests/migration: use the common library function
Date: Mon, 11 Nov 2019 15:39:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0

On 11/11/2019 15.11, Alex Bennée wrote:
> 
> Thomas Huth <address@hidden> writes:
> 
>> On 11/11/2019 13.55, Alex Bennée wrote:
>>> Signed-off-by: Alex Bennée <address@hidden>
>>
>> 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
> 




reply via email to

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