]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix time_point conversion in atomic timed waits
authorJonathan Wakely <jwakely@redhat.com>
Fri, 17 Jan 2025 22:16:08 +0000 (22:16 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 30 May 2025 09:02:27 +0000 (10:02 +0100)
commitaeaa9ba8fb631bf0562f9a82c1daa774af3d81ed
tree2de013ecf4b5d570c2a8bdd7f671ed63660181ac
parent97ea9d7b021c3e9f8d0c7e371d40ded811f76dac
libstdc++: Fix time_point conversion in atomic timed waits

Even if a time_point already uses the right clock, we might still need
to convert it to use the expected duration. Calling __to_wait_clock will
perform that conversion, so use that even when the clock is correct.

libstdc++-v3/ChangeLog:

* include/bits/atomic_timed_wait.h (__to_wait_clock): Do not use
chrono::ceil if clock and duration are already correct type.
(__wait_until): Always call __to_wait_clock.
libstdc++-v3/include/bits/atomic_timed_wait.h