gcc/libstdc++-v3/testsuite
Mike Crowe f33a43f9f7 libstdc++: Use correct duration for atomic_futex wait on custom clock [PR 91486]
As Jonathan Wakely pointed out[1], my change in commit
f9ddb696a2 should have been rounding to
the target clock duration type rather than the input clock duration type
in __atomic_futex_unsigned::_M_load_when_equal_until just as (e.g.)
condition_variable does.

As well as fixing this, let's create a rather contrived test that fails
with the previous code, but unfortunately only when run on a machine
with an uptime of over 208.5 days, and even then not always.

[1] https://gcc.gnu.org/pipermail/libstdc++/2020-September/051004.html

libstdc++-v3/ChangeLog:

	PR libstdc++/91486
	* include/bits/atomic_futex.h:
	(__atomic_futex_unsigned::_M_load_when_equal_until): Use target
	clock duration type when rounding.
	* testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
	Rename from test_pr91486.
	(float_steady_clock): New class for test.
	(test_pr91486_wait_until): New test.
2020-10-05 11:32:10 +01:00
..
17_intro libstdc++: Do not check "cold" name on darwin [PR 96736] 2020-08-21 18:24:40 +01:00
18_support libstdc++: Fix testcase by using terminate handler 2020-10-02 22:18:51 +01:00
19_diagnostics libstdc++: Ensure c++NN effective target present in all C++17 tests 2020-07-31 19:58:02 +01:00
20_util libstdc++: Test C++11 implementation of std::chrono::__detail::ceil 2020-10-05 11:09:03 +01:00
21_strings libstdc++: Remove tests for self-move debug assertions 2020-08-25 16:36:01 +01:00
22_locale
23_containers libstdc++: Remove overzealous static_asserts from std::span 2020-09-21 23:21:34 -04:00
24_iterators libstdc++: Add missing P0896 changes to <iterator> 2020-10-02 10:51:31 -04:00
25_algorithms libstdc++: Fix division by zero in std::sample 2020-09-21 20:48:23 -04:00
26_numerics libstdc++: Optimise GCD algorithms 2020-09-03 12:46:13 +01:00
27_io libstdc++: Fix out-of-bounds string_view access in filesystem::path [PR 97167] 2020-09-22 20:02:58 +01:00
28_regex libstdc++: Ensure c++NN effective-target present in more tests 2020-07-31 19:58:03 +01:00
29_atomics libstdc++: Change test to work without 64-bit atomics 2020-10-02 22:18:51 +01:00
30_threads libstdc++: Use correct duration for atomic_futex wait on custom clock [PR 91486] 2020-10-05 11:32:10 +01:00
abi
backward
config
data
decimal
experimental libstdc++: Optimise GCD algorithms 2020-09-03 12:46:13 +01:00
ext
lib diagnostics: Add new option -fdiagnostics-plain-output 2020-08-14 09:29:19 -04:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Remove inheritance from elements in std::tuple 2020-08-17 15:27:51 +01:00
libstdc++-xmethods
performance
special_functions
std libstdc++: Rearrange some range adaptors' data members 2020-09-28 12:05:32 -04:00
tr1 libstdc++: Ensure c++NN effective-target present in more tests 2020-07-31 19:58:03 +01:00
tr2
util
Makefile.am
Makefile.in