summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2011-10-22 21:31:24 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2011-10-22 22:31:24 +0100
commit3b2eeb43cfea2083ddd3b30d908418005f273432 (patch)
tree621f9002ec44cd4395c9dd19659892c43049e647 /libstdc++-v3/include/std
parentad2305adb4957005096c0fd019a1cb7071879abd (diff)
downloadgcc-3b2eeb43cfea2083ddd3b30d908418005f273432.tar.gz
re PR libstdc++/50196 ([C++0x] std::thread not available under macos)
PR libstdc++/50196 * acinclude.m4 (GLIBCXX_HAS_GTHREADS): Don't depend on _POSIX_TIMEOUTS. * configure: Regenerate. * include/std/mutex (timed_mutex, recursive_timed_mutex): Define conditionally on GTHREADS_HAS_MUTEX_TIMEDLOCK. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed): Define. * testsuite/lib/dg-options.exp (dg-require-gthreads-timed): Define. * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Use dg-require-gthreads-timed instead of dg-require-gthreads. * testsuite/30_threads/recursive_timed_mutex/native_handle/ typesizes.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/requirements/standard_layout.cc: Likewise. * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r180329
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r--libstdc++-v3/include/std/mutex2
1 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex
index 184011715c7..a1a63b27f33 100644
--- a/libstdc++-v3/include/std/mutex
+++ b/libstdc++-v3/include/std/mutex
@@ -206,6 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return &_M_mutex; }
};
+#if _GTHREAD_USE_MUTEX_TIMEDLOCK
/// timed_mutex
class timed_mutex
{
@@ -417,6 +418,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return try_lock_until(__atime);
}
};
+#endif
/// Do not acquire ownership of the mutex.
struct defer_lock_t { };