From patchwork Sat Jan 17 13:48:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 430112 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 DBC5A1401DA for ; Sun, 18 Jan 2015 00:49:10 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=VloD0oY3ddYbJkOcd RaEmB//RMFs6b/OW4fAd/ecWhhSqmjDqzCqtArJ5ja9z47bUoGYFmb7E7gaB1e1o MloyrBLJPewyolPjZ+BkJsBE4DddQVcTPCvlW2jiLr3qi8wMSuNJFZtIqFGNhefl tVIvD4yIec89Ni4DJkqGjTCb0o= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=ZweJvOtTLac5n2MMExhuoVe IBkE=; b=GW8K+qo+VdhU//B0ry/LdB24hiROjjPOsdfnsIkjMACra57MQ93U+kQ AvuEBdaP/AMBjzDHyXWDEXF8O/tBHGXDyWKfTaVcH487/u6hH23suWw6CJQ8WNLP GIWXracwfsQ4NkWntvwvkFSbww9PGbldmfA2x0Pnpn7grl1Atvek= Received: (qmail 29850 invoked by alias); 17 Jan 2015 13:49:03 -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 29824 invoked by uid 89); 17 Jan 2015 13:49:00 -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, 17 Jan 2015 13:48:58 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0HDmstm002206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 17 Jan 2015 08:48:55 -0500 Received: from localhost (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0HDmr51008527; Sat, 17 Jan 2015 08:48:54 -0500 Date: Sat, 17 Jan 2015 13:48:53 +0000 From: Jonathan Wakely To: Hans-Peter Nilsson Cc: pinskia@gmail.com, David Edelsohn , Torvald Riegel , GCC Patches , "libstdc++@gcc.gnu.org" Subject: Re: [patch libstdc++] Optimize synchronization in std::future if futexes are available. Message-ID: <20150117134853.GR3360@redhat.com> References: <9CAB68C4-08D2-43A1-9A8B-EDE135DDFC8F@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) On 17/01/15 01:45 -0500, Hans-Peter Nilsson wrote: >On Fri, 16 Jan 2015, pinskia@gmail.com wrote: >> > On Jan 16, 2015, at 9:57 PM, David Edelsohn wrote: >> > >> > This patch has broken bootstrap on AIX >> > >> > May I mention that this really should have been tested on systems >> > other than x86 Linux. >> >> It also broke all newlib targets too. So you could have tested one listed in the sim-test web page. > >For those interested, PR64638. Should be fixed in trunk now, by this patch. commit a0fe2162e3b10f6d35e4ea73bae209081bf2e9c2 Author: Jonathan Wakely Date: Sat Jan 17 13:29:17 2015 +0000 PR libstdc++/64638 * include/bits/atomic_futex.h: Use appropriate config macros for availability of std::mutex, std::condition and std::chrono. diff --git a/libstdc++-v3/include/bits/atomic_futex.h b/libstdc++-v3/include/bits/atomic_futex.h index 9a418d8..2673604 100644 --- a/libstdc++-v3/include/bits/atomic_futex.h +++ b/libstdc++-v3/include/bits/atomic_futex.h @@ -48,6 +48,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) struct __atomic_futex_unsigned_base { @@ -209,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; -#else +#else // !_GLIBCXX_HAVE_LINUX_FUTEX // If futexes are not available, use a mutex and a condvar to wait. // Because we access the data only within critical sections, all accesses @@ -280,7 +281,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; -#endif +#endif // _GLIBCXX_HAVE_LINUX_FUTEX +#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std