From patchwork Sun Jan 18 13:19:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 430206 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 BE37A140187 for ; Mon, 19 Jan 2015 00:19:57 +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=ZpGTSI7ORPJ+179xC iL11zbfP1yhc97H6OTINsc/o2w7Hrxv+fQXLhRJiGGvLcpBX5KL1NGJ4IV4ciuBy ks7lXMzeyuk6CjuOx1KvO2Daak1IQgdrnkI+yTTbrN6OAHeODorWX5TN1q3H2wcy hcIoPwrIHW3Ox07FZQ4y6DM98A= 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=vEbOzpH7Jf0DnWZHjizWSZQ djkQ=; b=a3KNdUTHbDCBvs6ijCmD/hsEsa//4LABC9gYtSsDeX0uW2uZYTTw4ze n1+d5SZzNtlbo3AYRsYxOOeRBns7p18aJGDvKYDDLW/IorGFlY1dpTBaYf4AcLBj PMEJKzoiYkv8/awqKIilMjgSJIpsiMtbhyCyACfDlReO8jgp9ytQ= Received: (qmail 304 invoked by alias); 18 Jan 2015 13:19:25 -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 32625 invoked by uid 89); 18 Jan 2015 13:19:23 -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; Sun, 18 Jan 2015 13:19:21 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0IDJHBq030832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 18 Jan 2015 08:19:17 -0500 Received: from localhost (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0IDJG7L018001; Sun, 18 Jan 2015 08:19:17 -0500 Date: Sun, 18 Jan 2015 13:19:15 +0000 From: Jonathan Wakely To: Sandra Loosemore Cc: Hans-Peter Nilsson , 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: <20150118131915.GY3360@redhat.com> References: <9CAB68C4-08D2-43A1-9A8B-EDE135DDFC8F@gmail.com> <20150117134853.GR3360@redhat.com> <54BABF38.7080602@codesourcery.com> <20150117202356.GT3360@redhat.com> <54BAE0A4.8040303@codesourcery.com> <20150117223629.GU3360@redhat.com> <54BAE822.5050507@codesourcery.com> <20150117225847.GV3360@redhat.com> <54BB1F9F.6010605@codesourcery.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54BB1F9F.6010605@codesourcery.com> User-Agent: Mutt/1.5.23 (2014-03-12) On 17/01/15 19:51 -0700, Sandra Loosemore wrote: >On 01/17/2015 03:58 PM, Jonathan Wakely wrote: >> >>My fault, this additional chunk is needed alongside the patch I sent >>earlier: >> >>--- a/libstdc++-v3/include/bits/atomic_futex.h >>+++ b/libstdc++-v3/include/bits/atomic_futex.h >>@@ -35,7 +35,7 @@ >>#include >>#include >>#include >>-#if !defined(_GLIBCXX_HAVE_LINUX_FUTEX) >>+#if ! (defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1) >>#include >>#include >>#endif >> >>What I sent earlier causes your target to use std::mutex and >>std::condition_variable, but without the bit above the headers aren't >>included. > >Still no joy: >/scratch/sandra/arm-fsf2/src/gcc-mainline/libstdc++-v3/src/c++11/futex.cc:45:3: >error: '__atomic_futex_unsigned_base' has not been declared > __atomic_futex_unsigned_base::_M_futex_wait_until(unsigned *__addr, > ^ >/scratch/sandra/arm-fsf2/src/gcc-mainline/libstdc++-v3/src/c++11/futex.cc:88:3: >error: '__atomic_futex_unsigned_base' has not been declared > __atomic_futex_unsigned_base::_M_futex_notify_all(unsigned* __addr) > ^ futex.cc needs the same change ... diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc index ad766c8..f24b44e 100644 --- a/libstdc++-v3/src/c++11/futex.cc +++ b/libstdc++-v3/src/c++11/futex.cc @@ -23,7 +23,7 @@ // . #include -#if defined(_GLIBCXX_HAVE_LINUX_FUTEX) +#if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1 #include #include #include