Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Torvald Riegel wrote: > Another option might be to require a minimum glibc version on Linux, and > build libstdc++ for that. That would yield a minimum kernel version as > well, and we may can make use of other things in return such as syscall > wrappers. A minimum glibc

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Jonathan Wakely
On 12/01/18 14:18 +0100, Torvald Riegel wrote: On Tue, 2018-01-09 at 17:54 +, Mike Crowe wrote: On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > On 07/01/18 20:55 +, Mike Crowe wrote: > > The futex system call supports waiting for an absolute time if > >

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Torvald Riegel
On Tue, 2018-01-09 at 17:54 +, Mike Crowe wrote: > On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > > On 07/01/18 20:55 +, Mike Crowe wrote: > > > The futex system call supports waiting for an absolute time if > > > FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT.

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-09 Thread Mike Crowe
On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > On 07/01/18 20:55 +, Mike Crowe wrote: > > The futex system call supports waiting for an absolute time if > > FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two > > benefits: > > > > 1. The call to

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-09 Thread Jonathan Wakely
On 07/01/18 20:55 +, Mike Crowe wrote: The futex system call supports waiting for an absolute time if FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two benefits: 1. The call to gettimeofday is not required in order to calculate a relative timeout. 2. If someone

[PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-07 Thread Mike Crowe
The futex system call supports waiting for an absolute time if FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two benefits: 1. The call to gettimeofday is not required in order to calculate a relative timeout. 2. If someone changes the system clock during the wait then