diff options
author | Ed Smith-Rowland <3dw4rd@verizon.net> | 2014-02-20 16:06:40 +0000 |
---|---|---|
committer | Edward Smith-Rowland <emsr@gcc.gnu.org> | 2014-02-20 16:06:40 +0000 |
commit | 4bbfc5fa4d4378ff138290a604f7065b014746bc (patch) | |
tree | ed175db7b5aca708ee777d59be6c90b5e4befd6b | |
parent | f1dbbe422e62d40b987b7e241cd571ba19dd3872 (diff) | |
download | gcc-4bbfc5fa4d4378ff138290a604f7065b014746bc.zip gcc-4bbfc5fa4d4378ff138290a604f7065b014746bc.tar.gz gcc-4bbfc5fa4d4378ff138290a604f7065b014746bc.tar.bz2 |
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
22 files changed, 54 insertions, 27 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8d04dfb..7e42778 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 <ro@CeBiTec.Uni-Bielefeld.DE> * 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 8cafd480..53b39f8 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 da479b8..c271577 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<mutex_type> 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 ab9d851..af01e0e 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<mutex_type> 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 2ca470e..17023b4 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<mutex_type> 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 cff54e0..db761e1 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<mutex_type> 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 1731f1d..712e68c 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<mutex_type> 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 ced28fb..bb1f902 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<mutex_type> 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 8d07eea..ececeb0 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<mutex_type> 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 aba28b9..3f120ad 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<mutex_type> 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<mutex_type> 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 d267e72a..2770a75 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<mutex_type> 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 a2e1588..8d11de9 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<mutex_type> 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 440ed2f..03abcc4 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<mutex_type> 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 fd8651d..a5e3493 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<mutex_type> 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 e6f511e..efd6156 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<shared_mutex>; + template class shared_lock<shared_timed_mutex>; } 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 8ceb3ee..738e7f1 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<std::shared_mutex> test_type; + typedef std::shared_lock<std::shared_timed_mutex> 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 61ca0da..b38cdbb 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 759d133..c8be741 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 754d162..780c193 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 0ca18e7..3133b10 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()<std::shared_mutex>(); + test.operator()<std::shared_timed_mutex>(); } 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 ab87ab1..c13e05b 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 f287771..28f833b 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 { |