diff options
author | Alexandre Oliva <oliva@adacore.com> | 2022-06-21 23:11:01 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2022-06-21 23:11:01 -0300 |
commit | f129628e8f261b66a34a9626e1f5b0293548a6a8 (patch) | |
tree | 09e761b9fa3e52a5d7c80806aa60035aacac6a64 /libstdc++-v3 | |
parent | 540ae3601e1d2403ae5ba27db36ca75cb1e8d055 (diff) |
libstdc++: testsuite: call sched_yield for nonpreemptive targets
As in the gcc testsuite, systems without preemptive multi-threading
require sched_yield calls to be placed at points in which a context
switch might be needed to enable the test to complete.
for libstdc++-v3/ChangeLog
* testsuite/30_threads/this_thread/60421.cc (test02): Call
sched_yield.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/testsuite/30_threads/this_thread/60421.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc index ad6f9aeffcc..12dbeba1cc4 100644 --- a/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc +++ b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc @@ -59,6 +59,7 @@ test02() while (!sleeping) { // Wait for the thread to start sleeping. + sched_yield (); } while (sleeping) { |