From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74097 invoked by alias); 11 Apr 2015 11:48:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 74073 invoked by uid 89); 11 Apr 2015 11:48:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 11 Apr 2015 11:48:53 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 22AA438DF09; Sat, 11 Apr 2015 11:48:52 +0000 (UTC) Received: from localhost (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3BBmpCL015615; Sat, 11 Apr 2015 07:48:51 -0400 Date: Sat, 11 Apr 2015 11:48:00 -0000 From: Jonathan Wakely To: Torvald Riegel Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] Fix shared_timed_mutex::try_lock_until() et al Message-ID: <20150411114850.GC9755@redhat.com> References: <20150407142830.GG9755@redhat.com> <1428512373.924.26.camel@triegel.csb> <20150408191159.GQ9755@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20150408191159.GQ9755@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-04/txt/msg00494.txt.bz2 On 08/04/15 20:11 +0100, Jonathan Wakely wrote: >diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog >index 5871716..39d6866 100644 >--- a/libstdc++-v3/ChangeLog >+++ b/libstdc++-v3/ChangeLog >@@ -2,7 +2,8 @@ > > * include/std/shared_mutex (shared_timed_mutex): Add comments to > explain the logic. >- (_M_n_readers): Rename to _S_n_readers. >+ (_Mutex): Remove redundant type. >+ (_M_n_readers): Rename to _S_max_readers. > (_M_write_entered, _M_readers): New convenience functions. > (lock, lock_shared, try_lock_shared, unlock_shared): Use convenience > functions. Use predicates with condition variables. Simplify bitwise >@@ -11,7 +12,8 @@ > and call try_lock_until or try_shared_lock_until respectively. > (try_lock_until, try_shared_lock_until): Wait on the condition > variables until the specified time passes. >- (unlock, unlock_shared): Add Debug Mode assertions. >+ (unlock): Add Debug Mode assertion. >+ (unlock_shared): Add Debug Mode assertion. > * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New. This has been committed to trunk and 4.9 (because on the 4.9 branch we only had the non-pthread_rwlock_t version with broken timed lock functions).