gcc/libstdc++-v3/testsuite/30_threads
Mike Crowe 2f59343265 Report early wakeup of condition_variable::wait_until as no_timeout
As currently implemented, condition_variable always ultimately waits
against std::chrono::system_clock. This clock can be changed in arbitrary
ways by the user which may result in us waking up too early or too late
when measured against the caller-supplied clock.

We can't (yet) do much about waking up too late (PR 41861), but
if we wake up too early we must return cv_status::no_timeout to indicate a
spurious wakeup rather than incorrectly returning cv_status::timeout.

2018-08-01  Mike Crowe  <mac@mcrowe.com>

	* include/std/condition_variable (wait_until): Only report timeout
	if we really have timed out when measured against the
	caller-supplied clock.
	* testsuite/30_threads/condition_variable/members/2.cc: Add test
	case to confirm above behaviour.

From-SVN: r263224
2018-08-01 16:39:45 +01:00
..
async Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
call_once Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
condition_variable Report early wakeup of condition_variable::wait_until as no_timeout 2018-08-01 16:39:45 +01:00
condition_variable_any * 30_threads/condition_variable_any/cond.cc: New test. 2018-07-26 21:23:12 +00:00
future Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
headers Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
lock Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
lock_guard Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
mutex Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
once_flag/cons Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
packaged_task Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
promise Remove dg-require-cstdint directive from tests 2018-07-26 15:02:42 +01:00
recursive_mutex Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
recursive_timed_mutex Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
scoped_lock Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
shared_future Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
shared_lock Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
shared_mutex Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
shared_timed_mutex Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
this_thread Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
thread Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
timed_mutex Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
try_lock Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00
unique_lock Remove dg-require-cstdint directive from tests 2018-07-26 15:03:01 +01:00