From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Archive: List-Post: List-Help: Sender: gcc-patches-owner@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 14:30:00 -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-Type: multipart/mixed; boundary="ivHc2SZskddb40s2" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-01/txt/msg01547.txt.bz2 --ivHc2SZskddb40s2 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 513 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. --ivHc2SZskddb40s2 Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 1257 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 --ivHc2SZskddb40s2--