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: 817 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 3A39836007B for ; Tue, 6 May 2014 03:27:09 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id C52E3187D26C; Tue, 6 May 2014 03:27:08 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 8D1F11808094 for ; Tue, 6 May 2014 03:27:08 -0700 (PDT) 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=SqHh8/D5tyZg5lmMP8mqIY8Tjz7qB qwQW7Gnid03+W4XcOcx4DVuNylH/i+HPzHMl4wZv0etoEgxEivQKmGq/Hm79oJlx +Hu9ILyNjzwOsRJCCYZMXTuDjDMic+MqzFWoDnxqML7FVpUwkNup3wPrBhKRkpGt Ssfx7V2qRMR9f4= 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=pps Fyz5tlWNegEZiCRgc0/rIavbH+WvFAiHitiMLjWJV/QmjmFwEHXnuZ2EMBje9jnK 3aWMsHpZhOS2PHgVj1YDqFhlKiqD27FeUH9yupqmMRqjO560ksL2pydJNC6Dz6jQ 6qoSzCnk/UDidIlgyKlzMgxSbcRBUi5xGUegyIwM= 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 X-DH-Original-To: glibc@patchwork.siddhesh.in 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; /*