On Tue, 3 Jun 2025 at 11:04, Tomasz Kaminski <tkami...@redhat.com> wrote: > > > > On Tue, Jun 3, 2025 at 12:02 PM Jonathan Wakely <jwak...@redhat.com> wrote: >> >> On Tue, 3 Jun 2025 at 09:38, Tomasz Kaminski wrote: >> > >> > >> > >> > On Mon, Jun 2, 2025 at 10:59 PM Jonathan Wakely <jwak...@redhat.com> wrote: >> >> >> >> These function templates are apparently never used or instantiated, >> >> because they don't compile. This fixes them, but they're still unused. >> >> I plan to make use of them in a later commit. >> >> >> >> libstdc++-v3/ChangeLog: >> >> >> >> * include/bits/atomic_timed_wait.h >> >> (__atomic_wait_address_until_v): >> >> Do not take address of __args in call to __detail::__wait_until. >> >> (__atomic_wait_address_for_v): Change parameter type from >> >> time_point >> >> to duration. >> >> --- >> >> >> >> Tested x86_64-linux. >> > >> > LGTM. >> >> I'm actually going to move the &__args to __args change from the "Fix >> incorrect comments on atomic timed waits" patch to this one, because >> they touch adjacent lines in the same function. That might as well be >> done in one patch. > > I think you should merge this two patches. The other patch despite the > the title also changes the implementation. So titling them as one would make > sense: > Fix errors and comments in atomic timed waiting functions
Yeah that makes sense, I'll combine them and push, thanks. >> >> >> >> >> >> >> >> >> >> >> libstdc++-v3/include/bits/atomic_timed_wait.h | 4 ++-- >> >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/libstdc++-v3/include/bits/atomic_timed_wait.h >> >> b/libstdc++-v3/include/bits/atomic_timed_wait.h >> >> index e22c13f47b18..bd2e6bf61ecf 100644 >> >> --- a/libstdc++-v3/include/bits/atomic_timed_wait.h >> >> +++ b/libstdc++-v3/include/bits/atomic_timed_wait.h >> >> @@ -157,7 +157,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >> >> bool __bare_wait = false) noexcept >> >> { >> >> __detail::__wait_args __args{ __addr, __old, __order, __bare_wait >> >> }; >> >> - auto __res = __detail::__wait_until(__addr, &__args, __atime); >> >> + auto __res = __detail::__wait_until(__addr, __args, __atime); >> >> return !__res._M_timeout; // C++26 will also return last observed >> >> __val >> >> } >> >> >> >> @@ -202,7 +202,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >> >> __atomic_wait_address_for_v(const __detail::__platform_wait_t* >> >> __addr, >> >> __detail::__platform_wait_t __old, >> >> int __order, >> >> - const chrono::time_point<_Rep, _Period>& >> >> __rtime, >> >> + const chrono::duration<_Rep, _Period>& >> >> __rtime, >> >> bool __bare_wait = false) noexcept >> >> { >> >> __detail::__wait_args __args{ __addr, __old, __order, __bare_wait >> >> }; >> >> -- >> >> 2.49.0 >> >> >>