From patchwork Fri Feb 21 14:44:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ed Smith-Rowland <3dw4rd@verizon.net> X-Patchwork-Id: 322899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2C2DD2C0320 for ; Sat, 22 Feb 2014 01:45:17 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=bI2o0v1ulSrm7AtaMNWVJ777HCdYqnyFlpO4lfts/ME+Hs gCm6yP1e++YhCk3aaugp3sqpLnM9M7yfrX9aWFtFNz5p/z2hceWPUUzQxAc1Wk/H GVIVyb6UWllWUWpEvyic5REJBNS/9PJtiqDsJJuD4CeRllDtM/6tUUyOvWSeA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=Wrebi6lPIsBcy5bzK1cGcfDclco=; b=FZ4VSuOBIEgkiXx4WqAO YUJFovLBHDx0Qgntqs0paicVhKr33wGAKTGY+wU9m9GFtv51aWa0Hrr7P4qypCaE rR2oWBzg1zmQRAQWBHTxjxE7XpVOWG+l8h4A6iXUe1BlGJKVnNZrwat9cDvzAiZ6 dUaK2rnwqnxWD8vKt9CXvBw= Received: (qmail 22994 invoked by alias); 21 Feb 2014 14:45:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 22980 invoked by uid 89); 21 Feb 2014 14:45:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: vms173021pub.verizon.net Received: from vms173021pub.verizon.net (HELO vms173021pub.verizon.net) (206.46.173.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Feb 2014 14:45:00 +0000 Received: from [192.168.1.13] ([unknown] [71.179.0.154]) by vms173021.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0N1C00EIKOYBVZA0@vms173021.mailsrvcs.net> for gcc-patches@gcc.gnu.org; Fri, 21 Feb 2014 08:44:36 -0600 (CST) Message-id: <53076653.3050906@verizon.net> Date: Fri, 21 Feb 2014 09:44:35 -0500 From: Ed Smith-Rowland <3dw4rd@verizon.net> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-version: 1.0 To: gcc-patches Subject: [libstdc++-v3] Move shared_mutex to shared_timed_mutex - late C++14 change (n3891) Content-type: multipart/mixed; boundary=------------080604070001080007020804 This are the patches as applied Built and tested x86_64-linux. 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-21 Ed Smith-Rowland <3dw4rd@verizon.net> Rename testsuite directory shared_mutex to shared_timed_mutex for consistency. * testsuite/30_threads/shared_mutex: Moved to... * testsuite/30_threads/shared_timed_mutex: ...here Index: testsuite/30_threads/shared_mutex/cons/1.cc =================================================================== --- testsuite/30_threads/shared_mutex/cons/1.cc (revision 207940) +++ testsuite/30_threads/shared_mutex/cons/1.cc (working copy) @@ -1,49 +0,0 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++1y -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++1y -pthreads" { target *-*-solaris* } } -// { dg-options " -std=gnu++1y " { target *-*-cygwin *-*-darwin* } } -// { dg-require-cstdint "" } -// { dg-require-gthreads "" } - -// Copyright (C) 2013-2014 Free Software Foundation, Inc. -// -// 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) -// 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - - -#include -#include -#include - -int main() -{ - bool test __attribute__((unused)) = true; - typedef std::shared_timed_mutex mutex_type; - - try - { - mutex_type m1; - } - catch (const std::system_error& e) - { - VERIFY( false ); - } - catch (...) - { - VERIFY( false ); - } - - return 0; -} Index: testsuite/30_threads/shared_mutex/cons/assign_neg.cc =================================================================== --- testsuite/30_threads/shared_mutex/cons/assign_neg.cc (revision 207940) +++ testsuite/30_threads/shared_mutex/cons/assign_neg.cc (working copy) @@ -1,35 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++1y" } -// { dg-require-cstdint "" } -// { dg-require-gthreads "" } - -// Copyright (C) 2008-2014 Free Software Foundation, Inc. -// -// 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) -// 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - - -#include - -void test01() -{ - // assign - typedef std::shared_timed_mutex mutex_type; - mutex_type m1; - mutex_type m2; - m1 = m2; // { dg-error "deleted" } -} - -// { dg-prune-output "include" } Index: testsuite/30_threads/shared_mutex/cons/copy_neg.cc =================================================================== --- testsuite/30_threads/shared_mutex/cons/copy_neg.cc (revision 207940) +++ testsuite/30_threads/shared_mutex/cons/copy_neg.cc (working copy) @@ -1,34 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++1y" } -// { dg-require-cstdint "" } -// { dg-require-gthreads "" } - -// Copyright (C) 2013-2014 Free Software Foundation, Inc. -// -// 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) -// 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - - -#include - -void test01() -{ - // assign - typedef std::shared_timed_mutex mutex_type; - mutex_type m1; - mutex_type m2(m1); // { dg-error "deleted" } -} - -// { dg-prune-output "include" } Index: testsuite/30_threads/shared_mutex/requirements/standard_layout.cc =================================================================== --- testsuite/30_threads/shared_mutex/requirements/standard_layout.cc (revision 207940) +++ testsuite/30_threads/shared_mutex/requirements/standard_layout.cc (working copy) @@ -1,31 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++1y" } -// { dg-require-cstdint "" } -// { dg-require-gthreads "" } - -// Copyright (C) 2013-2014 Free Software Foundation, Inc. -// -// 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) -// 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - - -#include -#include - -void test01() -{ - __gnu_test::standard_layout test; - test.operator()(); -} Index: testsuite/30_threads/shared_mutex/try_lock/1.cc =================================================================== --- testsuite/30_threads/shared_mutex/try_lock/1.cc (revision 207940) +++ testsuite/30_threads/shared_mutex/try_lock/1.cc (working copy) @@ -1,52 +0,0 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++1y -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++1y -pthreads" { target *-*-solaris* } } -// { dg-options " -std=gnu++1y " { target *-*-cygwin *-*-darwin* } } -// { dg-require-cstdint "" } -// { dg-require-gthreads "" } - -// Copyright (C) 2013-2014 Free Software Foundation, Inc. -// -// 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) -// 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - - -#include -#include -#include - -int main() -{ - bool test __attribute__((unused)) = true; - typedef std::shared_timed_mutex mutex_type; - - try - { - mutex_type m; - bool b = m.try_lock(); - VERIFY( b ); - m.unlock(); - } - catch (const std::system_error& e) - { - VERIFY( false ); - } - catch (...) - { - VERIFY( false ); - } - - return 0; -} Index: testsuite/30_threads/shared_mutex/try_lock/2.cc =================================================================== --- testsuite/30_threads/shared_mutex/try_lock/2.cc (revision 207940) +++ testsuite/30_threads/shared_mutex/try_lock/2.cc (working copy) @@ -1,67 +0,0 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++1y -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++1y -pthreads" { target *-*-solaris* } } -// { dg-options " -std=gnu++1y " { target *-*-cygwin *-*-darwin* } } -// { dg-require-cstdint "" } -// { dg-require-gthreads "" } - -// Copyright (C) 2013-2014 Free Software Foundation, Inc. -// -// 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) -// 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. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - - -#include -#include -#include -#include - -int main() -{ - bool test __attribute__((unused)) = true; - typedef std::shared_timed_mutex mutex_type; - - try - { - mutex_type m; - m.lock(); - bool b; - - std::thread t([&] { - try - { - b = m.try_lock(); - } - catch (const std::system_error& e) - { - VERIFY( false ); - } - }); - t.join(); - VERIFY( !b ); - - m.unlock(); - } - catch (const std::system_error& e) - { - VERIFY( false ); - } - catch (...) - { - VERIFY( false ); - } - - return 0; -} Index: include/std/shared_mutex =================================================================== --- include/std/shared_mutex (revision 207061) +++ include/std/shared_mutex (working copy) @@ -52,8 +52,8 @@ */ #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 @@ 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 Index: testsuite/30_threads/shared_lock/locking/2.cc =================================================================== --- testsuite/30_threads/shared_lock/locking/2.cc (revision 205961) +++ testsuite/30_threads/shared_lock/locking/2.cc (working copy) @@ -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 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 Index: testsuite/30_threads/shared_lock/locking/4.cc =================================================================== --- testsuite/30_threads/shared_lock/locking/4.cc (revision 205961) +++ testsuite/30_threads/shared_lock/locking/4.cc (working copy) @@ -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; Index: testsuite/30_threads/shared_lock/locking/1.cc =================================================================== --- testsuite/30_threads/shared_lock/locking/1.cc (revision 205961) +++ testsuite/30_threads/shared_lock/locking/1.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/locking/3.cc =================================================================== --- testsuite/30_threads/shared_lock/locking/3.cc (revision 205961) +++ testsuite/30_threads/shared_lock/locking/3.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc =================================================================== --- testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc (revision 205961) +++ testsuite/30_threads/shared_lock/requirements/explicit_instantiation.cc (working copy) @@ -27,5 +27,5 @@ namespace std { - template class shared_lock; + template class shared_lock; } Index: testsuite/30_threads/shared_lock/requirements/typedefs.cc =================================================================== --- testsuite/30_threads/shared_lock/requirements/typedefs.cc (revision 205961) +++ testsuite/30_threads/shared_lock/requirements/typedefs.cc (working copy) @@ -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; } Index: testsuite/30_threads/shared_lock/cons/2.cc =================================================================== --- testsuite/30_threads/shared_lock/cons/2.cc (revision 205961) +++ testsuite/30_threads/shared_lock/cons/2.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/cons/4.cc =================================================================== --- testsuite/30_threads/shared_lock/cons/4.cc (revision 205961) +++ testsuite/30_threads/shared_lock/cons/4.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/cons/1.cc =================================================================== --- testsuite/30_threads/shared_lock/cons/1.cc (revision 205961) +++ testsuite/30_threads/shared_lock/cons/1.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/cons/6.cc =================================================================== --- testsuite/30_threads/shared_lock/cons/6.cc (revision 205961) +++ testsuite/30_threads/shared_lock/cons/6.cc (working copy) @@ -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; Index: testsuite/30_threads/shared_lock/cons/3.cc =================================================================== --- testsuite/30_threads/shared_lock/cons/3.cc (revision 205961) +++ testsuite/30_threads/shared_lock/cons/3.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/cons/5.cc =================================================================== --- testsuite/30_threads/shared_lock/cons/5.cc (revision 205961) +++ testsuite/30_threads/shared_lock/cons/5.cc (working copy) @@ -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; Index: testsuite/30_threads/shared_lock/modifiers/2.cc =================================================================== --- testsuite/30_threads/shared_lock/modifiers/2.cc (revision 205961) +++ testsuite/30_threads/shared_lock/modifiers/2.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_lock/modifiers/1.cc =================================================================== --- testsuite/30_threads/shared_lock/modifiers/1.cc (revision 205961) +++ testsuite/30_threads/shared_lock/modifiers/1.cc (working copy) @@ -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 Index: testsuite/30_threads/shared_mutex/requirements/standard_layout.cc =================================================================== --- testsuite/30_threads/shared_mutex/requirements/standard_layout.cc (revision 205961) +++ testsuite/30_threads/shared_mutex/requirements/standard_layout.cc (working copy) @@ -27,5 +27,5 @@ void test01() { __gnu_test::standard_layout test; - test.operator()(); + test.operator()(); } Index: testsuite/30_threads/shared_mutex/cons/copy_neg.cc =================================================================== --- testsuite/30_threads/shared_mutex/cons/copy_neg.cc (revision 205961) +++ testsuite/30_threads/shared_mutex/cons/copy_neg.cc (working copy) @@ -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" } } Index: testsuite/30_threads/shared_mutex/cons/1.cc =================================================================== --- testsuite/30_threads/shared_mutex/cons/1.cc (revision 205961) +++ testsuite/30_threads/shared_mutex/cons/1.cc (working copy) @@ -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 { Index: testsuite/30_threads/shared_mutex/cons/assign_neg.cc =================================================================== --- testsuite/30_threads/shared_mutex/cons/assign_neg.cc (revision 205961) +++ testsuite/30_threads/shared_mutex/cons/assign_neg.cc (working copy) @@ -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" } Index: testsuite/30_threads/shared_mutex/try_lock/2.cc =================================================================== --- testsuite/30_threads/shared_mutex/try_lock/2.cc (revision 205961) +++ testsuite/30_threads/shared_mutex/try_lock/2.cc (working copy) @@ -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 { Index: testsuite/30_threads/shared_mutex/try_lock/1.cc =================================================================== --- testsuite/30_threads/shared_mutex/try_lock/1.cc (revision 205961) +++ testsuite/30_threads/shared_mutex/try_lock/1.cc (working copy) @@ -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 {