Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-17 Thread Thomas Rodgers
On 2021-05-17 09:43, Jonathan Wakely wrote: On 14/05/21 18:09 +0100, Jonathan Wakely wrote: On 13/05/21 18:54 -0700, Thomas Rodgers wrote: From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. li

Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 14/05/21 18:09 +0100, Jonathan Wakely wrote: On 13/05/21 18:54 -0700, Thomas Rodgers wrote: From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. libstdc++/ChangeLog: * include/bits/atomic

Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-14 Thread Jonathan Wakely via Gcc-patches
On 13/05/21 18:54 -0700, Thomas Rodgers wrote: From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop un

[PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-13 Thread Thomas Rodgers
From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop until value change observed. (__waiter_base

[PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-13 Thread Thomas Rodgers
From: Thomas Rodgers libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop until value change observed. (__waiter_base::_M_a): Renamed member from _M_addr, changed type to uintptr_t. (__waiter_base::_S_wait_addr): Change return ty

Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-10 Thread Jonathan Wakely via Gcc-patches
On 03/05/21 09:43 -0700, Thomas Rodgers wrote: From: Thomas Rodgers This should also be backported to gcc-11 The additional _M_laundered data member changes the object layout. That isn't safe for the branch. Would it be possible to smuggle that flag in the least significant bit of the _M_addr

[PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-03 Thread Thomas Rodgers
From: Thomas Rodgers This should also be backported to gcc-11 libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop until observe value change. (__waiter_base::_M_laundered): New member. (__watier_base::_M_notify): Check _M_laundered to