public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Andreas Schwab <schwab@linux-m68k.org>,
	Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH v3 3/4] linux: Normalize and return timeout on select (BZ #27651)
Date: Mon, 12 Apr 2021 15:26:53 -0300	[thread overview]
Message-ID: <1fc213a1-83e8-cd53-fd94-28bde185265c@linaro.org> (raw)
In-Reply-To: <4b770bd2-2c65-fb16-e1fd-cbea990d5a87@linaro.org>



On 12/04/2021 09:20, Adhemerval Zanella wrote:
> 
> 
> On 12/04/2021 05:28, Andreas Schwab wrote:
>> On Apr 09 2021, Adhemerval Zanella via Libc-alpha wrote:
>>
>>> @@ -52,10 +74,13 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
>>>           (though the pselect() glibc call suppresses this behavior).
>>>           Since select() on Linux has the same behavior as the pselect6
>>>           syscall, we update the timeout here.  */
>>> -      if (r == 0 || errno != ENOSYS)
>>> +      if (r >= 0 || errno != ENOSYS)
>>>  	{
>>>  	  if (timeout != NULL)
>>> -	    TIMEVAL_TO_TIMESPEC (timeout, &ts64);
>>> +	    {
>>> +	      timeout->tv_sec = ts64.tv_sec;
>>> +	      timeout->tv_usec = ts64.tv_nsec / NSEC_PER_USEC;
>>> +	    }
>>
>> What's wrong with TIMESPEC_TO_TIMEVAL?
>>
>> Andreas.
>>
> 
> None in fact, I will adjust to use TIMESPEC_TO_TIMEVAL.
> 

Are you ok with the patch with the TIMESPEC_TO_TIMEVAL change?

  reply	other threads:[~2021-04-12 18:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 15:53 [PATCH v3 1/4] libsupport: Add support_select_modifies_timeout Adhemerval Zanella
2021-04-09 15:53 ` [PATCH v3 2/4] libsupport: Add support_select_normalizes_timeout Adhemerval Zanella
2021-04-09 16:24   ` Florian Weimer
2021-04-09 15:53 ` [PATCH v3 3/4] linux: Normalize and return timeout on select (BZ #27651) Adhemerval Zanella
2021-04-12  8:28   ` Andreas Schwab
2021-04-12 12:20     ` Adhemerval Zanella
2021-04-12 18:26       ` Adhemerval Zanella [this message]
2021-04-12 19:20         ` Andreas Schwab
2021-04-09 15:53 ` [PATCH v3 4/4] linux: always update select timeout (BZ #27706) Adhemerval Zanella
2021-04-09 16:23 ` [PATCH v3 1/4] libsupport: Add support_select_modifies_timeout Florian Weimer

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=1fc213a1-83e8-cd53-fd94-28bde185265c@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.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 read-only IMAP folder(s) and NNTP newsgroup(s).