From patchwork Sun Feb 1 15:13:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 435240 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 7DD61140161 for ; Mon, 2 Feb 2015 02:14: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=B/P5fhjpDAS0/PmbY 7wrTdUt74UnOmt35v6A3o/VeHi2J+b1A4RVbNCnUXzZjclMqg/cKg6HL5ZwD3lW0 J6XZBd6aaQH29/m2aKd4HKZov0DQC/WY5oxd11ksIFq3+mmy9gLkiR0+NDRKuMhf KCJj5icwc6NClIDtDDm7Hi4R8g= 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=V+nK37VWJwK13nppgjBBbX6 le/c=; b=VcJEBcrXQrU9mBH1Xi4WTzzPiRHllioe5eDxRSBEJVGPJBIPeMKWk2z SCqpvu9N+DoI4ypO9eyBajdic5DLTiNA50Rqh5lau0AxdVnvA8qM08/lGJbwrPaD UAMaKN1s5e3NynJuKlSOu/7WrZbtV3KCPwkc4k3xjLA+LZ0GSWm0= Received: (qmail 29486 invoked by alias); 1 Feb 2015 15:13:42 -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 29466 invoked by uid 89); 1 Feb 2015 15:13:41 -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, 01 Feb 2015 15:13:40 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t11FDcsD028740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 1 Feb 2015 10:13:39 -0500 Received: from localhost (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t11FDbc8023458; Sun, 1 Feb 2015 10:13:38 -0500 Date: Sun, 1 Feb 2015 15:13:37 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Torvald Riegel Subject: Re: [patch libstdc++] Optimize synchronization in std::future if futexes are available. Message-ID: <20150201151337.GN3360@redhat.com> References: <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> <20150118131915.GY3360@redhat.com> <20150118143921.GZ3360@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150118143921.GZ3360@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) One more patch to fix the preprocessor conditions, this time to fix --disable-threads builds. Tested x86_64-linux, committed to trunk. commit 911783907e5482c09d80fd8a5e3b5aa6d2b891d3 Author: Jonathan Wakely Date: Sat Jan 31 22:01:43 2015 +0000 * src/c++11/futex.cc: Do not define for gthr-single.h targets. diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc index 1336779..a7f0200 100644 --- a/libstdc++-v3/src/c++11/futex.cc +++ b/libstdc++-v3/src/c++11/futex.cc @@ -23,6 +23,7 @@ // . #include +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1 #include #include @@ -94,3 +95,4 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif +#endif