gcc/libstdc++-v3/testsuite/30_threads
Alexandre Oliva 0b2c1781db libstdc++: testsuite: tolerate non-cancelling sleep
Though sleep, nanosleep and clock_nanosleep are all POSIX cancellation
points, not all target systems follow this POSIX requirement.
30_threads/thread/native_handle/cancel.cc will run until it times out
on such systems.

Rather than failing a C++ library test because of a limitation of the
target system, this patch gives the test a chance to successfully
exercise the features it intends to exercise, by introducing a
cancellation point in a loop that would otherwise run indefinitely on
systems exhibiting this limitation.


for  libstdc++-v3/ChangeLog

	* testsuite/30_threads/thread/native_handle/cancel.cc: Add an
	explicit cancellation point in case sleep_for lacks one.
2022-06-23 23:25:52 -03:00
..
async Update copyright years. 2022-01-03 10:42:10 +01:00
barrier Update copyright years. 2022-01-03 10:42:10 +01:00
call_once Update copyright years. 2022-01-03 10:42:10 +01:00
condition_variable Update copyright years. 2022-01-03 10:42:10 +01:00
condition_variable_any Update copyright years. 2022-01-03 10:42:10 +01:00
future Update copyright years. 2022-01-03 10:42:10 +01:00
headers Update copyright years. 2022-01-03 10:42:10 +01:00
jthread Update copyright years. 2022-01-03 10:42:10 +01:00
latch Update copyright years. 2022-01-03 10:42:10 +01:00
lock Update copyright years. 2022-01-03 10:42:10 +01:00
lock_guard Update copyright years. 2022-01-03 10:42:10 +01:00
mutex Update copyright years. 2022-01-03 10:42:10 +01:00
packaged_task libstdc++: Add deduction guides for std::packaged_task [PR105375] 2022-04-25 16:16:33 +01:00
promise Update copyright years. 2022-01-03 10:42:10 +01:00
recursive_mutex Update copyright years. 2022-01-03 10:42:10 +01:00
recursive_timed_mutex Update copyright years. 2022-01-03 10:42:10 +01:00
scoped_lock Update copyright years. 2022-01-03 10:42:10 +01:00
semaphore Update copyright years. 2022-01-03 10:42:10 +01:00
shared_future Update copyright years. 2022-01-03 10:42:10 +01:00
shared_lock Update copyright years. 2022-01-03 10:42:10 +01:00
shared_mutex Update copyright years. 2022-01-03 10:42:10 +01:00
shared_timed_mutex Update copyright years. 2022-01-03 10:42:10 +01:00
stop_token Update copyright years. 2022-01-03 10:42:10 +01:00
this_thread libstdc++: testsuite: call sched_yield for nonpreemptive targets 2022-06-21 23:11:01 -03:00
thread libstdc++: testsuite: tolerate non-cancelling sleep 2022-06-23 23:25:52 -03:00
timed_mutex Update copyright years. 2022-01-03 10:42:10 +01:00
try_lock Update copyright years. 2022-01-03 10:42:10 +01:00
unique_lock Update copyright years. 2022-01-03 10:42:10 +01:00