gcc/libstdc++-v3/include/std/condition_variable

264 lines
7.2 KiB
Plaintext
Raw Normal View History

condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
// <condition_variable> -*- C++ -*-
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
/** @file condition_variable
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_CONDITION_VARIABLE
#define _GLIBCXX_CONDITION_VARIABLE 1
#pragma GCC system_header
#ifndef __GXX_EXPERIMENTAL_CXX0X__
# include <c++0x_warning.h>
#else
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
#include <chrono>
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
#include <mutex> // unique_lock
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
namespace std
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
{
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
/**
* @defgroup condition_variables Condition Variables
* @ingroup concurrency
*
* Classes for condition_variable support.
* @{
*/
/// cv_status
enum class cv_status { no_timeout, timeout };
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
/// condition_variable
class condition_variable
{
condition_variable (condition_variable): Remove _M_internal_mutex. 2009-02-09 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable (condition_variable): Remove _M_internal_mutex. Add private __native_type typedef. * src/condition_variable.cc (condition_variable::notify_one): Remove _M_internal_mutex use. Use typedef. (condition_variable::notify_all): Same. * include/std/mutex (mutex): Add private __native_type typedef. Use it. (recursive_mutex): Same. (timed_mutex): Same. (recursive_timed_mutex): Same. (once_flag): Make __native_type typedef private. * include/std/thread (this_thread): Add minimal markup. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Adjust line numbers. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/util/thread/all.h: Testsuite utilities for testing thread. * testsuite/30_threads/condition_variable_any/native_handle/ typesizes.cc: New. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/thread/native_handle/typesizes.cc: Same. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/condition_variable/native_handle/ typesizes.cc: Same. * testsuite/30_threads/recursive_timed_mutex/native_handle/ typesizes.cc: Same. From-SVN: r144053
2009-02-10 09:29:57 +01:00
typedef chrono::system_clock __clock_t;
typedef __gthread_cond_t __native_type;
__native_type _M_cond;
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
public:
condition_variable (condition_variable): Remove _M_internal_mutex. 2009-02-09 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable (condition_variable): Remove _M_internal_mutex. Add private __native_type typedef. * src/condition_variable.cc (condition_variable::notify_one): Remove _M_internal_mutex use. Use typedef. (condition_variable::notify_all): Same. * include/std/mutex (mutex): Add private __native_type typedef. Use it. (recursive_mutex): Same. (timed_mutex): Same. (recursive_timed_mutex): Same. (once_flag): Make __native_type typedef private. * include/std/thread (this_thread): Add minimal markup. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Adjust line numbers. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/util/thread/all.h: Testsuite utilities for testing thread. * testsuite/30_threads/condition_variable_any/native_handle/ typesizes.cc: New. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/thread/native_handle/typesizes.cc: Same. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/condition_variable/native_handle/ typesizes.cc: Same. * testsuite/30_threads/recursive_timed_mutex/native_handle/ typesizes.cc: Same. From-SVN: r144053
2009-02-10 09:29:57 +01:00
typedef __native_type* native_handle_type;
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
condition_variable.cc (condition_variable, [...]): Mark throw() * src/condition_variable.cc (condition_variable, condition_variable_any constructors): Mark throw() * src/hash.cc (operator() for long double, string, and wstring): Mark throw (). * src/strstream.cc (strstreambuf constructors, freeze, str, pcount, _M_setup, rdbuf, str): Mark throw (). * src/chrono.cc (new): Mark throw (). * include/std/system_error (system_category, generic_category): Mark throw () and const. * include/std/chrono (now): Mark throw (). * include/std/condition_variable (condition_variable, ~condition_variable, condition_variable_any, ~condition_variable_any): Mark throw (). * include/std/mutex (mutex): Mark throw (). * include/bits/stl_list.h (swap, transfer, reverse, hook, unhook): Mark throw. * include/bits/functional_hash.h (operator() on size_t): Mark pure and throw (). * include/bits/locale_facets.tcc (__verify_grouping): Mark pure. * include/bits/locale_classes.h (_S_initialize_once, _S_clone_c_locale): Mark throw (). (_S_get_c_name): Mark const and throw (). (_M_id, _M_compare, _M_transform, _M_compare, _M_transform): Mark throw (). * include/bits/locale_facets.h (__convert_to_v explicit instances): Mark throw (). (_M_convert_to_wmask, _M_initialize_ctype, _S_format_float): Mark throw (). * include/bits/ios_base.h (_M_dispose_callbacks, _M_init, imbue, ios_base): Mark throw () * include/bits/locale_facets_nonio.h (_M_put): Mark throw. * include/backward/strstream (strstreambuf constructors): Mark throw (). (str, freeze, _M_setupf): Mark throw (). (pcount): Mark pure and throw (). (rdbuf): Mark const and throw (). From-SVN: r146328
2009-04-18 23:19:18 +02:00
condition_variable() throw ();
~condition_variable() throw ();
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
condition_variable(const condition_variable&) = delete;
condition_variable& operator=(const condition_variable&) = delete;
void
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
notify_one();
void
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
notify_all();
void
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
wait(unique_lock<mutex>& __lock);
template<typename _Predicate>
void
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
wait(unique_lock<mutex>& __lock, _Predicate __p)
{
while (!__p())
wait(__lock);
}
template<typename _Duration>
cv_status
wait_until(unique_lock<mutex>& __lock,
const chrono::time_point<__clock_t, _Duration>& __atime)
{ return __wait_until_impl(__lock, __atime); }
template<typename _Clock, typename _Duration>
cv_status
wait_until(unique_lock<mutex>& __lock,
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
const chrono::time_point<_Clock, _Duration>& __atime)
{
// DR 887 - Sync unknown clock to known clock.
const typename _Clock::time_point __c_entry = _Clock::now();
const __clock_t::time_point __s_entry = __clock_t::now();
const chrono::nanoseconds __delta = __atime - __c_entry;
const __clock_t::time_point __s_atime = __s_entry + __delta;
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
return __wait_until_impl(__lock, __s_atime);
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
}
template<typename _Clock, typename _Duration, typename _Predicate>
bool
wait_until(unique_lock<mutex>& __lock,
const chrono::time_point<_Clock, _Duration>& __atime,
_Predicate __p)
{
condition_variable (condition_variable): Remove _M_internal_mutex. 2009-02-09 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable (condition_variable): Remove _M_internal_mutex. Add private __native_type typedef. * src/condition_variable.cc (condition_variable::notify_one): Remove _M_internal_mutex use. Use typedef. (condition_variable::notify_all): Same. * include/std/mutex (mutex): Add private __native_type typedef. Use it. (recursive_mutex): Same. (timed_mutex): Same. (recursive_timed_mutex): Same. (once_flag): Make __native_type typedef private. * include/std/thread (this_thread): Add minimal markup. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Adjust line numbers. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/util/thread/all.h: Testsuite utilities for testing thread. * testsuite/30_threads/condition_variable_any/native_handle/ typesizes.cc: New. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/thread/native_handle/typesizes.cc: Same. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/condition_variable/native_handle/ typesizes.cc: Same. * testsuite/30_threads/recursive_timed_mutex/native_handle/ typesizes.cc: Same. From-SVN: r144053
2009-02-10 09:29:57 +01:00
while (!__p())
if (wait_until(__lock, __atime) == cv_status::timeout)
return __p();
return true;
}
template<typename _Rep, typename _Period>
cv_status
wait_for(unique_lock<mutex>& __lock,
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
const chrono::duration<_Rep, _Period>& __rtime)
{ return wait_until(__lock, __clock_t::now() + __rtime); }
template<typename _Rep, typename _Period, typename _Predicate>
bool
wait_for(unique_lock<mutex>& __lock,
const chrono::duration<_Rep, _Period>& __rtime,
_Predicate __p)
{ return wait_until(__lock, __clock_t::now() + __rtime, std::move(__p)); }
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
native_handle_type
native_handle()
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
{ return &_M_cond; }
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
private:
template<typename _Clock, typename _Duration>
cv_status
__wait_until_impl(unique_lock<mutex>& __lock,
const chrono::time_point<_Clock, _Duration>& __atime)
{
chrono::time_point<__clock_t, chrono::seconds> __s =
chrono::time_point_cast<chrono::seconds>(__atime);
chrono::nanoseconds __ns =
chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
__gthread_time_t __ts =
{
static_cast<std::time_t>(__s.time_since_epoch().count()),
static_cast<long>(__ns.count())
};
__gthread_cond_timedwait(&_M_cond, __lock.mutex()->native_handle(),
&__ts);
return (_Clock::now() < __atime
? cv_status::no_timeout : cv_status::timeout);
}
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
};
/// condition_variable_any
// Like above, but mutex is not required to have try_lock.
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
class condition_variable_any
{
typedef chrono::system_clock __clock_t;
condition_variable _M_cond;
mutex _M_mutex;
condition_variable (condition_variable): Remove _M_internal_mutex. 2009-02-09 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable (condition_variable): Remove _M_internal_mutex. Add private __native_type typedef. * src/condition_variable.cc (condition_variable::notify_one): Remove _M_internal_mutex use. Use typedef. (condition_variable::notify_all): Same. * include/std/mutex (mutex): Add private __native_type typedef. Use it. (recursive_mutex): Same. (timed_mutex): Same. (recursive_timed_mutex): Same. (once_flag): Make __native_type typedef private. * include/std/thread (this_thread): Add minimal markup. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Adjust line numbers. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/util/thread/all.h: Testsuite utilities for testing thread. * testsuite/30_threads/condition_variable_any/native_handle/ typesizes.cc: New. * testsuite/30_threads/mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/thread/native_handle/typesizes.cc: Same. * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Same. * testsuite/30_threads/condition_variable/native_handle/ typesizes.cc: Same. * testsuite/30_threads/recursive_timed_mutex/native_handle/ typesizes.cc: Same. From-SVN: r144053
2009-02-10 09:29:57 +01:00
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
public:
typedef condition_variable::native_handle_type native_handle_type;
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
condition_variable.cc (condition_variable, [...]): Mark throw() * src/condition_variable.cc (condition_variable, condition_variable_any constructors): Mark throw() * src/hash.cc (operator() for long double, string, and wstring): Mark throw (). * src/strstream.cc (strstreambuf constructors, freeze, str, pcount, _M_setup, rdbuf, str): Mark throw (). * src/chrono.cc (new): Mark throw (). * include/std/system_error (system_category, generic_category): Mark throw () and const. * include/std/chrono (now): Mark throw (). * include/std/condition_variable (condition_variable, ~condition_variable, condition_variable_any, ~condition_variable_any): Mark throw (). * include/std/mutex (mutex): Mark throw (). * include/bits/stl_list.h (swap, transfer, reverse, hook, unhook): Mark throw. * include/bits/functional_hash.h (operator() on size_t): Mark pure and throw (). * include/bits/locale_facets.tcc (__verify_grouping): Mark pure. * include/bits/locale_classes.h (_S_initialize_once, _S_clone_c_locale): Mark throw (). (_S_get_c_name): Mark const and throw (). (_M_id, _M_compare, _M_transform, _M_compare, _M_transform): Mark throw (). * include/bits/locale_facets.h (__convert_to_v explicit instances): Mark throw (). (_M_convert_to_wmask, _M_initialize_ctype, _S_format_float): Mark throw (). * include/bits/ios_base.h (_M_dispose_callbacks, _M_init, imbue, ios_base): Mark throw () * include/bits/locale_facets_nonio.h (_M_put): Mark throw. * include/backward/strstream (strstreambuf constructors): Mark throw (). (str, freeze, _M_setupf): Mark throw (). (pcount): Mark pure and throw (). (rdbuf): Mark const and throw (). From-SVN: r146328
2009-04-18 23:19:18 +02:00
condition_variable_any() throw ();
~condition_variable_any() throw ();
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
condition_variable_any(const condition_variable_any&) = delete;
condition_variable_any& operator=(const condition_variable_any&) = delete;
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
void
notify_one()
{
lock_guard<mutex> __lock(_M_mutex);
_M_cond.notify_one();
}
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
void
notify_all()
{
lock_guard<mutex> __lock(_M_mutex);
_M_cond.notify_all();
}
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
template<typename _Lock>
void
wait(_Lock& __lock)
{
unique_lock<mutex> __my_lock(_M_mutex);
__lock.unlock();
_M_cond.wait(__my_lock);
__lock.lock();
}
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
template<typename _Lock, typename _Predicate>
void
wait(_Lock& __lock, _Predicate __p)
{
while (!__p())
wait(__lock);
}
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
template<typename _Lock, typename _Clock, typename _Duration>
cv_status
wait_until(_Lock& __lock,
const chrono::time_point<_Clock, _Duration>& __atime)
{
unique_lock<mutex> __my_lock(_M_mutex);
__lock.unlock();
cv_status __status = _M_cond.wait_until(__my_lock, __atime);
__lock.lock();
return __status;
}
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
template<typename _Lock, typename _Clock,
typename _Duration, typename _Predicate>
bool
wait_until(_Lock& __lock,
const chrono::time_point<_Clock, _Duration>& __atime,
_Predicate __p)
{
while (!__p())
if (wait_until(__lock, __atime) == cv_status::timeout)
return __p();
return true;
}
template<typename _Lock, typename _Rep, typename _Period>
cv_status
wait_for(_Lock& __lock, const chrono::duration<_Rep, _Period>& __rtime)
{ return wait_until(__lock, __clock_t::now() + __rtime); }
template<typename _Lock, typename _Rep,
typename _Period, typename _Predicate>
bool
wait_for(_Lock& __lock,
const chrono::duration<_Rep, _Period>& __rtime, _Predicate __p)
{ return wait_until(__lock, __clock_t::now() + __rtime, std::move(__p)); }
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
native_handle_type
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
native_handle()
{ return _M_cond.native_handle(); }
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
};
user.cfg.in: Tweaks. 2009-02-20 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Tweaks. * doc/doxygen/doxygroups.cc: Prefer markup that can be elsewhere, be elsewhere. * include/tr1_impl/unordered_map: Just use most specialized container module. * include/tr1_impl/unordered_set: Same. * include/tr1_impl/array: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/forward_list.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_bvector.h: Same. * include/backward/binders.h: Change binder module to binders. * include/std/complex: Add complex_numers module. * include/tr1_impl/complex: Same. * include/std/valarray: Add numeric_arrays module. * include/bits/gslice_array.h: Same. * include/bits/gslice.h: Same. * include/bits/mask_array.h: Same. * include/bits/slice_array.h: Same. * include/bits/indirect_array.h: Same. * include/bits/allocator.h: Add allocators module. * include/ext/throw_allocator.h * include/ext/pool_allocator.h * include/ext/bitmap_allocator.h * include/ext/new_allocator.h * include/ext/malloc_allocator.h * include/ext/array_allocator.h * include/ext/mt_allocator.h * include/ext/debug_allocator.h * include/ext/extptr_allocator.h * include/tr1_impl/functional: Move namespace markup here. * include/tr1_impl/regex: Same. * include/tr1_impl/type_traits: Add metaprogramming module. * include/std/type_traits: Same. * include/std/memory: Add memory module. * include/std/ratio: Add ratio module. * include/std/chrono: Move namespace markup here, add time module. * include/std/thread: Move namespace markup here, add concurrency module. * include/std/mutex: Use concurrency module. * include/std/condition_variable: Same. * include/bits/ios_base.h: Refine io module. * include/bits/basic_ios.h: Same. * include/std/fstream: Same. * include/std/istream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/ext/vstring.h: Correct parameter markup. * include/bits/shared_ptr.h: Add pointer_abstractions module. * include/bits/unique_ptr.h: Same. * include/bits/algorithmfwd.h: Add mutating_algorithms, non_mutating_algorithms, sorting_algorithms. Adjust nesting. * include/bits/stl_heap.h: Add markup for new groupings. * include/bits/stl_algobase.h: Same. * include/bits/stl_algo.h: Same. * include/c_compatibility/stdatomic.h: Add atomics module. * include/c_global/cstdatomic: Same. * libsupc++/exception: Add exceptions module. * libsupc++/typeinfo: Same. * libsupc++/new: Same. * libsupc++/exception_ptr.h: Same. * include/std/system_error: Same. * include/std/stdexcept: Same. * libsupc++/cxxabi.h: Move doxygroups.cc markup here. * libsupc++/cxxabi-forced.h: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Fix up line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Same. * testsuite/30_threads/mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/thread/cons/assign_neg.cc: Same. * testsuite/30_threads/thread/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Same. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Same. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/20_util/duration/cons/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. * testsuite/20_util/unique_ptr/assign/assign.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow.cc: Same. From-SVN: r144343
2009-02-21 01:45:21 +01:00
// @} group condition_variables
condition_variable: New. 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/condition_variable: New. * include/std/mutex: New. * src/condition_variable.cc: New. * src/mutex.cc: New. * include/bits/functexcept.h: Add __throw_system_error varients. * src/functexcept.cc: Same. * config/abi/pre/gnu.ver: Add exports. * doc/xml/manual/using.xml: Add new includes. * doc/doxygen/user.cfg.in: Doxygen support. * doc/doxygen/doxygroups.cc: Same. * include/Makefile.am: Add mutex, condition_variable. * include/Makefile.in: Regenerated. * src/Makefile.am: Add mutex.cc, condition_variable.cc. * src/Makefile.in: Regenerated. * testsuite/30_threads: New. * testsuite/30_threads/lock_error: New. * testsuite/30_threads/mutex: New. * testsuite/30_threads/mutex/dest: New. * testsuite/30_threads/mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/mutex/native_handle: New. * testsuite/30_threads/mutex/native_handle/1.cc: New. * testsuite/30_threads/mutex/cons: New. * testsuite/30_threads/mutex/cons/assign_neg.cc: New. * testsuite/30_threads/mutex/cons/1.cc: New. * testsuite/30_threads/mutex/cons/copy_neg.cc: New. * testsuite/30_threads/mutex/requirements: New. * testsuite/30_threads/mutex/requirements/typedefs.cc: New. * testsuite/30_threads/mutex/try_lock: New. * testsuite/30_threads/mutex/try_lock/1.cc: New. * testsuite/30_threads/mutex/try_lock/2.cc: New. * testsuite/30_threads/mutex/lock: New. * testsuite/30_threads/mutex/lock/1.cc: New. * testsuite/30_threads/mutex/unlock: New. * testsuite/30_threads/mutex/unlock/1.cc: New. * testsuite/30_threads/recursive_mutex: New. * testsuite/30_threads/recursive_mutex/dest: New. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: New. * testsuite/30_threads/recursive_mutex/native_handle: New. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: New. * testsuite/30_threads/recursive_mutex/cons: New. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: New. * testsuite/30_threads/recursive_mutex/cons/1.cc: New. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: New. * testsuite/30_threads/recursive_mutex/requirements: New. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard: New. * testsuite/30_threads/lock_guard/requirements: New. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: New. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: New. * testsuite/30_threads/headers: New. * testsuite/30_threads/headers/mutex: New. * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: New. * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: New. * testsuite/30_threads/headers/condition_variable: New. * testsuite/30_threads/headers/condition_variable/ types_std_c++0x.cc: New. * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc: New. * testsuite/30_threads/once_flag: New. * testsuite/30_threads/unique_lock: New. * testsuite/30_threads/unique_lock/requirements: New. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: New. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: New. * testsuite/17_intro/headers/c++200x/all.cc: Add new includes. From-SVN: r135007
2008-05-06 23:11:47 +02:00
}
condition_variable: Use new deleted ctors. 2008-09-03 Chris Fairles <chris.fairles@gmail.com> * include/std/condition_variable: Use new deleted ctors. * include/std/mutex: Likewise plus implement timed_mutex, recursive_timed_mutex and call_once. * src/condition_variable.cc: Implement wait(). Use gthread types. Remove _GTHREADS_HAS_COND checks in favor of global _GLIBCXX_HAS_GTHREADS. * src/mutex.cc (call_once): Implementation using TLS with mutex fallback. * config/abi/pre/gnu.ver: Add exported symbols. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New. * testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise. * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use dg-require-gthreads and dg-require-cstdint. * testsuite/30_threads/lock_guard/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/mutex/cons/1.cc: Likewise. * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/mutex/lock/1.cc: Likewise. * testsuite/30_threads/mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/ explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error lines for deleted members. * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/call_once/once_flag.cc: New. * testsuite/30_threads/call_once/call_once1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise * testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc: Likewise. * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise. * testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise. * testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. From-SVN: r139943
2008-09-03 19:46:09 +02:00
#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
#endif // __GXX_EXPERIMENTAL_CXX0X__
#endif // _GLIBCXX_CONDITION_VARIABLE