From patchwork Mon Dec 5 11:19:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 702688 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 3tXMj53gtPz9sfH for ; Mon, 5 Dec 2016 22:19:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="Au07fed3"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=if906+XM57Sq8+rDMOAPMuO/Xc6pT bJzxFR8hnsK9VyfStDB2jNGW6tP5ElBEgn/sy/SGqU884mELFKSjcD0Yf8F1gSYJ nNGdK3S2n6mtEZfKbbjDA8Txr3VOt8dZtU08BP5tzcIruWltD1s0mIsHsMIFvCwv 0NxM6/dptf8180= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=4dAijuuyvVQ6tM6THOyIZOMSGSc=; b=Au0 7fed3XLAAUbDnZQ5SKcYJfX5YJwCA/ERG4m6GCEe1jJE5N/shSqHK6LGKocgs8Zc jzv9CW9J1z3GjzrveqlFHDoxwuKlDrrdytmlYTlmqbPrQuuQYs55+Zne9GWYTEwH rQ2mqGqcwmqJKKP60Tq/oUeP26t7YvoO0MtPlO0c= Received: (qmail 121807 invoked by alias); 5 Dec 2016 11:19:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 121170 invoked by uid 89); 5 Dec 2016 11:19:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=33, 6, rwlocks, locks X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Get rid of __elision_available X-Yow: HOW could a GLASS be YELLING?? Date: Mon, 05 Dec 2016 12:19:00 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 There is nothing that uses that variable. Andreas. * sysdeps/unix/sysv/linux/x86/elision-conf.h (__elision_available): Don't declare. * sysdeps/unix/sysv/linux/x86/elision-conf.c (__elision_available): Don't define. (elision_init): Don't set __elision_available. --- sysdeps/unix/sysv/linux/x86/elision-conf.c | 11 +++-------- sysdeps/unix/sysv/linux/x86/elision-conf.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.c b/sysdeps/unix/sysv/linux/x86/elision-conf.c index 0d98133804..c8e77a64ee 100644 --- a/sysdeps/unix/sysv/linux/x86/elision-conf.c +++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c @@ -43,11 +43,6 @@ struct elision_config __elision_aconf = .skip_trylock_internal_abort = 3, }; -/* Set when the CPU supports elision. When false elision is never attempted. - */ - -int __elision_available attribute_hidden; - /* Force elision for all new locks. This is used to decide whether existing DEFAULT locks should be automatically upgraded to elision in pthread_mutex_lock(). Disabled for suid programs. Only used when elision @@ -62,11 +57,11 @@ elision_init (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)), char **environ) { - __elision_available = HAS_CPU_FEATURE (RTM); + int elision_available = HAS_CPU_FEATURE (RTM); #ifdef ENABLE_LOCK_ELISION - __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available; + __pthread_force_elision = __libc_enable_secure ? 0 : elision_available; #endif - if (!HAS_CPU_FEATURE (RTM)) + if (!elision_available) __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */ } diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.h b/sysdeps/unix/sysv/linux/x86/elision-conf.h index 6c479b31e7..39bf5d9dd7 100644 --- a/sysdeps/unix/sysv/linux/x86/elision-conf.h +++ b/sysdeps/unix/sysv/linux/x86/elision-conf.h @@ -33,7 +33,6 @@ struct elision_config extern struct elision_config __elision_aconf attribute_hidden; -extern int __elision_available attribute_hidden; extern int __pthread_force_elision attribute_hidden; /* Tell the test suite to test elision for this architecture. */