aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-04-22 17:26:50 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-04-22 17:35:00 +0100
commit6924588774a02dec63fb4b0ad19aed303accc2d2 (patch)
tree6cd0ea40f2e93ba7f24da4f44311bfbf7f08775b /gcc
parent58871c03318e080962f022f5d77db3c4fde3e351 (diff)
downloadgcc-6924588774a02dec63fb4b0ad19aed303accc2d2.zip
gcc-6924588774a02dec63fb4b0ad19aed303accc2d2.tar.gz
gcc-6924588774a02dec63fb4b0ad19aed303accc2d2.tar.bz2
libstdc++: Fix semaphore to work with system_clock timeouts
The __cond_wait_until_impl function takes a steady_clock timeout, but then sometimes tries to compare it to a time from the system_clock, which won't compile. Additionally, that function gets called with system_clock timeouts, which also won't compile. This makes the function accept timeouts for either clock, and compare to the time from the right clock. This fixes the compilation error that was causing two tests to fail on non-futex targets, so we can revert the r12-11 change to disable them. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__cond_wait_until_impl): Handle system_clock as well as steady_clock. * testsuite/30_threads/semaphore/try_acquire_for.cc: Re-enable. * testsuite/30_threads/semaphore/try_acquire_until.cc: Re-enable.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions