diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-11-26 14:13:32 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-11-26 16:15:52 +0000 |
commit | 10ee46adf44ae731fc4f9e9fdc25ad60c9d43a9c (patch) | |
tree | 099e4a08c5c4d20a446f9beb44d5a1e8a84e98a5 /libstdc++-v3/testsuite/30_threads | |
parent | 294e72e9acbd0ff15ef5b18895de62cc173464ca (diff) | |
download | gcc-10ee46adf44ae731fc4f9e9fdc25ad60c9d43a9c.zip gcc-10ee46adf44ae731fc4f9e9fdc25ad60c9d43a9c.tar.gz gcc-10ee46adf44ae731fc4f9e9fdc25ad60c9d43a9c.tar.bz2 |
libstdc++: Add "futex" and "gthreads" effective-target keywords
This adds a new "futex" effective-target keyword that can be used to
selectively enable/disable tests based on _GLIBCXX_HAVE_LINUX_FUTEX,
instead of checking for that macro in the code.
It also adds "gthreads" as another one, to make the result of the
dg-require-gthreads directive usable in target selectors.
With these new keywords two tests that are currently only run for linux
can also be run for targets using gthr-single.h (e.g. AIX single-thread
multilib, and targets without a gthreads implementation).
libstdc++-v3/ChangeLog:
* testsuite/18_support/96817.cc: Use new effective-target
keywords to select supported targets more effectively.
* testsuite/30_threads/call_once/66146.cc: Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_futex):
Define new proc.
(check_effective_target_gthreads): Define new proc to replace
dg-require-gthreads.
Diffstat (limited to 'libstdc++-v3/testsuite/30_threads')
-rw-r--r-- | libstdc++-v3/testsuite/30_threads/call_once/66146.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/30_threads/call_once/66146.cc b/libstdc++-v3/testsuite/30_threads/call_once/66146.cc index b1ca0eb..a9c9948 100644 --- a/libstdc++-v3/testsuite/30_threads/call_once/66146.cc +++ b/libstdc++-v3/testsuite/30_threads/call_once/66146.cc @@ -16,9 +16,11 @@ // <http://www.gnu.org/licenses/>. // { dg-do run { target c++11 } } -// { dg-skip-if "" { pthread && { ! *-*-*linux* } } } // { dg-additional-options "-pthread" { target pthread } } +// Currently std::call_once is broken for gthreads targets without futexes: +// { dg-skip-if "see PR 66146" { gthreads && { ! futex } } } + #include <mutex> #include <cstdlib> #include <testsuite_hooks.h> |