Re: libstdc++: Fix chrono::__detail::ceil to work with C++11 (was Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486])

2020-10-05 Thread Jonathan Wakely via Gcc-patches
On 19/09/20 11:37 +0100, Mike Crowe wrote: On Friday 11 September 2020 at 19:59:36 +0100, Jonathan Wakely wrote: commit 53ad6b1979f4bd7121e977c4a44151b14d8a0147 Author: Jonathan Wakely Date: Fri Sep 11 19:59:11 2020 libstdc++: Fix chrono::__detail::ceil to work with C++11 In C++11 c

Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486]

2020-10-05 Thread Jonathan Wakely via Gcc-patches
On 19/09/20 11:50 +0100, Mike Crowe wrote: On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: > > diff --git a/libstdc++-v3/include/bits/atomic_futex.h b/libstdc++-v3/include/bits/atomic_futex.h > > index 5f95ade..aa137a7 100644 > > --- a/libstdc++-v3/include/bits/atomic_futex.h > > +++ b

Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486]

2020-09-19 Thread Mike Crowe via Gcc-patches
On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: > > > diff --git a/libstdc++-v3/include/bits/atomic_futex.h > > > b/libstdc++-v3/include/bits/atomic_futex.h > > > index 5f95ade..aa137a7 100644 > > > --- a/libstdc++-v3/include/bits/atomic_futex.h > > > +++ b/libstdc++-v3/include/bits/atomi

libstdc++: Fix chrono::__detail::ceil to work with C++11 (was Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486])

2020-09-19 Thread Mike Crowe via Gcc-patches
On Friday 11 September 2020 at 19:59:36 +0100, Jonathan Wakely wrote: > commit 53ad6b1979f4bd7121e977c4a44151b14d8a0147 > Author: Jonathan Wakely > Date: Fri Sep 11 19:59:11 2020 > > libstdc++: Fix chrono::__detail::ceil to work with C++11 > > In C++11 constexpr functions can only

Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486]

2020-09-11 Thread Jonathan Wakely via Gcc-patches
On 11/09/20 18:22 +0100, Jonathan Wakely wrote: On 11/09/20 15:41 +0100, Jonathan Wakely wrote: On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: Convert the specified duration to the target clock's duration type before adding it to the current time in __atomic_futex_unsigned::_M_load_wh

Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486]

2020-09-11 Thread Jonathan Wakely via Gcc-patches
On 11/09/20 15:41 +0100, Jonathan Wakely wrote: On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: Convert the specified duration to the target clock's duration type before adding it to the current time in __atomic_futex_unsigned::_M_load_when_equal_for and _M_load_when_equal_until. This

Re: [PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486]

2020-09-11 Thread Jonathan Wakely via Gcc-patches
On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: Convert the specified duration to the target clock's duration type before adding it to the current time in __atomic_futex_unsigned::_M_load_when_equal_for and _M_load_when_equal_until. This removes the risk of the timeout being rounded dow

[PATCH v5 6/8] libstdc++ atomic_futex: Avoid rounding errors in std::future::wait_* [PR91486]

2020-05-28 Thread Mike Crowe via Gcc-patches
Convert the specified duration to the target clock's duration type before adding it to the current time in __atomic_futex_unsigned::_M_load_when_equal_for and _M_load_when_equal_until. This removes the risk of the timeout being rounded down to the current time resulting in there being no wait at a