From patchwork Tue May 6 10:27:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 346124 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 8B5D2140E3A for ; Tue, 6 May 2014 20:27:12 +1000 (EST) 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=X+c0VAkm5yklK7U/2vWufi32CH4Hh BZNAOogAaTYOQSpBCNOrs40ZuvrR/MIsUFvBxCaGyRLh/NavNG2aiJRTpcg/gJNf gX7OLZiQoSd5p/Be9J+34HOVVOJ+3+HZcHb9l4aUUN24zL5RpvSTYkii4yCvbsbJ a87Nvl4FjGR0Do= 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=PherRvy3gDD5H1gaXIByOzdzfhY=; b=HVI iMxRaZ0nqQPmpQz4sYEqplng00DQMbWdpxAGptdajUDDSzCl3dO2cBFLfBQ+L2gl xTKMJBMHTG6Q1SZ49S+Den8/9/vIft2NBOLpJG9likPfS2x4QI+kz/wgQ8/L3DeK q+CE9AOiFJ6vOfP3G2TuB75m7nt7RtdQGzZf0kI4= Received: (qmail 12989 invoked by alias); 6 May 2014 10:27:06 -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 12973 invoked by uid 89); 6 May 2014 10:27:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Don't use catomic functions in mcount X-Yow: Hello, GORRY-O!! I'm a GENIUS from HARVARD!! Date: Tue, 06 May 2014 12:27:01 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 mcount cannot use catomic function since it is called by __libc_start_main before TLS is set up. This reverts the change made by commit 8099361. Andreas. [BZ #16912] * gmon/mcount.c (_MCOUNT_DECL): Use atomic_compare_and_exchange_bool_acq instead of catomic_compare_and_exchange_bool_acq. --- gmon/mcount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gmon/mcount.c b/gmon/mcount.c index 0c2acd2..9d4a1a50 100644 --- a/gmon/mcount.c +++ b/gmon/mcount.c @@ -69,8 +69,8 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */ * check that we are profiling * and that we aren't recursively invoked. */ - if (catomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY, - GMON_PROF_ON)) + if (atomic_compare_and_exchange_bool_acq (&p->state, GMON_PROF_BUSY, + GMON_PROF_ON)) return; /*