From: Ed Smith-Rowland <3dw4rd@verizon.net> Date: Thu, 20 Feb 2014 16:06:40 +0000 (+0000) Subject: Rename shared_mutex to shared_timed_mutex per C++14 acceptance of N3891. X-Git-Tag: releases/gcc-4.9.0~800 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bbfc5fa4d4378ff138290a604f7065b014746bc;p=thirdparty%2Fgcc.git Rename shared_mutex to shared_timed_mutex per C++14 acceptance of N3891. 2014-02-20 Ed Smith-Rowland <3dw4rd@verizon.net> Rename shared_mutex to shared_timed_mutex per C++14 acceptance of N3891. * include/std/shared_mutex: Rename shared_mutex to shared_timed_mutex. * testsuite/30_threads/shared_lock/locking/2.cc: Ditto. * testsuite/30_threads/shared_lock/locking/4.cc: Ditto. * testsuite/30_threads/shared_lock/locking/1.cc: Ditto. * testsuite/30_threads/shared_lock/locking/3.cc: Ditto. * testsuite/30_threads/shared_lock/requirements/ explicit_instantiation.cc: Ditto. * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Ditto. * testsuite/30_threads/shared_lock/cons/2.cc: Ditto. * testsuite/30_threads/shared_lock/cons/4.cc: Ditto. * testsuite/30_threads/shared_lock/cons/1.cc: Ditto. * testsuite/30_threads/shared_lock/cons/6.cc: Ditto. * testsuite/30_threads/shared_lock/cons/3.cc: Ditto. * testsuite/30_threads/shared_lock/cons/5.cc: Ditto. * testsuite/30_threads/shared_lock/modifiers/2.cc: Ditto. * testsuite/30_threads/shared_lock/modifiers/1.cc: Ditto. * testsuite/30_threads/shared_mutex/requirements/ standard_layout.cc: Ditto. * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Ditto. * testsuite/30_threads/shared_mutex/cons/1.cc: Ditto. * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Ditto. * testsuite/30_threads/shared_mutex/try_lock/2.cc: Ditto. * testsuite/30_threads/shared_mutex/try_lock/1.cc: Ditto. From-SVN: r207964 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8d04dfb78ed8..7e42778fda5a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,30 @@ +2014-02-20 Ed Smith-Rowland <3dw4rd@verizon.net> + + Rename shared_mutex to shared_timed_mutex per C++14 acceptance of N3891. + * include/std/shared_mutex: Rename shared_mutex to shared_timed_mutex. + * testsuite/30_threads/shared_lock/locking/2.cc: Ditto. + * testsuite/30_threads/shared_lock/locking/4.cc: Ditto. + * testsuite/30_threads/shared_lock/locking/1.cc: Ditto. + * testsuite/30_threads/shared_lock/locking/3.cc: Ditto. + * testsuite/30_threads/shared_lock/requirements/ + explicit_instantiation.cc: Ditto. + * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Ditto. + * testsuite/30_threads/shared_lock/cons/2.cc: Ditto. + * testsuite/30_threads/shared_lock/cons/4.cc: Ditto. + * testsuite/30_threads/shared_lock/cons/1.cc: Ditto. + * testsuite/30_threads/shared_lock/cons/6.cc: Ditto. + * testsuite/30_threads/shared_lock/cons/3.cc: Ditto. + * testsuite/30_threads/shared_lock/cons/5.cc: Ditto. + * testsuite/30_threads/shared_lock/modifiers/2.cc: Ditto. + * testsuite/30_threads/shared_lock/modifiers/1.cc: Ditto. + * testsuite/30_threads/shared_mutex/requirements/ + standard_layout.cc: Ditto. + * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Ditto. + * testsuite/30_threads/shared_mutex/cons/1.cc: Ditto. + * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Ditto. + * testsuite/30_threads/shared_mutex/try_lock/2.cc: Ditto. + * testsuite/30_threads/shared_mutex/try_lock/1.cc: Ditto. + 2014-02-10 Rainer Orth * testsuite/22_locale/num_put/put/char/14220.cc: Don't xfail diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex index 8cafd480144e..53b39f8251b0 100644 --- a/libstdc++-v3/include/std/shared_mutex +++ b/libstdc++-v3/include/std/shared_mutex @@ -52,8 +52,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) - /// shared_mutex - class shared_mutex + /// shared_timed_mutex + class shared_timed_mutex { #if _GTHREAD_USE_MUTEX_TIMEDLOCK struct _Mutex : mutex, __timed_mutex_impl<_Mutex> @@ -84,15 +84,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static constexpr unsigned _M_n_readers = ~_S_write_entered; public: - shared_mutex() : _M_state(0) {} + shared_timed_mutex() : _M_state(0) {} - ~shared_mutex() + ~shared_timed_mutex() { _GLIBCXX_DEBUG_ASSERT( _M_state == 0 ); } - shared_mutex(const shared_mutex&) = delete; - shared_mutex& operator=(const shared_mutex&) = delete; + shared_timed_mutex(const shared_timed_mutex&) = delete; + shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; // Exclusive ownership diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc index da479b88edb3..c271577cf3e0 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc index ab9d8519fb5f..af01e0e661d5 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc index 2ca470e593d2..17023b410a73 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc index cff54e0dd6c9..db761e1f55d7 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc index 1731f1d1eb3c..712e68ca6631 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc @@ -31,7 +31,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; typedef std::chrono::system_clock clock_type; diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc index ced28fbb1848..bb1f902acecc 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc @@ -31,7 +31,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; typedef std::chrono::system_clock clock_type; diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc index 8d07eeac348e..ececeb0074a9 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc index aba28b964c9b..3f120ad44656 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc @@ -30,7 +30,7 @@ void test01() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try @@ -66,7 +66,7 @@ void test01() void test02() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc index d267e72afc4d..2770a75ed16b 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc @@ -31,7 +31,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc index a2e1588bf53a..8d11de9b0353 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc @@ -31,7 +31,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; typedef std::chrono::system_clock clock_type; diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc index 440ed2f1a6e7..03abcc4c8d7b 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/2.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/2.cc index fd8651d238a8..a5e3493738f6 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/2.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/2.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; typedef std::shared_lock lock_type; try diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc index e6f511eac5db..efd61565bdfa 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc @@ -27,5 +27,5 @@ namespace std { - template class shared_lock; + template class shared_lock; } diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/typedefs.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/typedefs.cc index 8ceb3eeda3f0..738e7f147143 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_lock/requirements/typedefs.cc @@ -28,6 +28,6 @@ void test01() { // Check for required typedefs - typedef std::shared_lock test_type; + typedef std::shared_lock test_type; typedef test_type::mutex_type mutex_type; } diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc index 61ca0daf6fcb..b38cdbbcbcaa 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; try { diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc index 759d13357331..c8be74101eab 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/assign_neg.cc @@ -26,7 +26,7 @@ void test01() { // assign - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; mutex_type m1; mutex_type m2; m1 = m2; // { dg-error "deleted" } diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc index 754d162eeaee..780c1934112d 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/copy_neg.cc @@ -26,7 +26,7 @@ void test01() { // assign - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; mutex_type m1; mutex_type m2(m1); // { dg-error "deleted" } } diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc index 0ca18e7c60db..3133b10eb469 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/requirements/standard_layout.cc @@ -27,5 +27,5 @@ void test01() { __gnu_test::standard_layout test; - test.operator()(); + test.operator()(); } diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc index ab87ab1118f7..c13e05b57e1c 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc @@ -30,7 +30,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; try { diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc index f287771675cf..28f833ba6f3f 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc @@ -31,7 +31,7 @@ int main() { bool test __attribute__((unused)) = true; - typedef std::shared_mutex mutex_type; + typedef std::shared_timed_mutex mutex_type; try {