This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] c++0x <mutex> and <condition_variable>
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Chris Fairles <chris dot fairles at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 02 Sep 2008 23:59:58 +0200
- Subject: Re: [v3] c++0x <mutex> and <condition_variable>
- References: <fac6bb500809021438h329d7137n61bb77da160e7f27@mail.gmail.com>
Hi Chris,
One thing that's unclear to me is how to determine the targets in the
testcase's dg-do run option. I'm just using what I think Benjamin (or
whoever did the initial commit) was using. I'm not sure how to go
about determining whether its still correct or not.
We should be very careful indeed. I did these issues a bit of thought.
For anything using threads I think we need the same dg-* directives we
have in the shared_ptr tests, for instance and known to be safe:
// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris*
*-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
// { dg-options "-pthread -std=gnu++0x" { target *-*-freebsd*
*-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
// { dg-options "-pthreads -std=gnu++0x" { target *-*-solaris* } }
// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ in case the test relies on the new gthread support, we need a new
dg-require very similar to the one I added for the atomic builtins (look
for check_v3_target_atomic_builtins) checking that <bits/c++config.h>
defines _GLIBCXX_HAS_GTHREADS. Likewise for any other feature required
for the correct build and run of the test (__GTHREAD_HAS_COND?!?).
Really rather mechanical additions.
That way the dg-* directives should ok. Maybe a little redundant in case
of dg-require for gthreads, because likely many of the above targets
currently do not use posix threads, but safe, anyway and ready in case
further threading models besides posix define the C++0x functions.
Paolo.