Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933473AbZKXQUU (ORCPT ); Tue, 24 Nov 2009 11:20:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758113AbZKXQUT (ORCPT ); Tue, 24 Nov 2009 11:20:19 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:51570 "EHLO e6.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758095AbZKXQUS (ORCPT ); Tue, 24 Nov 2009 11:20:18 -0500 Message-ID: <4B0C07C2.7090608@us.ibm.com> Date: Tue, 24 Nov 2009 08:20:18 -0800 From: Darren Hart User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Hitoshi Mitake CC: Ingo Molnar , linux-kernel@vger.kernel.org, Michel Lespinasse , Peter Zijlstra , Paul Mackerras , Frederic Weisbecker Subject: Re: [PATCH 1/3] perf bench: Add wrappers for atomic operation of GCC References: <20091118033741.GB23808@google.com> <1259073555-7312-2-git-send-email-mitake@dcl.info.waseda.ac.jp> In-Reply-To: <1259073555-7312-2-git-send-email-mitake@dcl.info.waseda.ac.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2068 Lines: 56 Hitoshi Mitake wrote: > This patch adds new file util/include/asm/atomic.h. > It contains wrappers for atomic operation of GCC, > I think this is useful not only for 'perf bench', > but also for entire of perf command. > > This patch adds new typedefed struct 'atomic_t'. > I know new typedef is not a thing to welcome, > but I believe that atomic_t is worth to typedef > because it is much general. > > I borrowed this file from Darren Hart's futextest. > http://git.kernel.org/?p=linux/kernel/git/dvhart/futextest.git Hi Hitoshi-san, I took the gcc built-ins approach for futextest.h because I didn't want the hassle of maintaining per-arch asm files. Since perf is already in the kernel source, I wonder if you could leverage the already existing kernel atomic code? See Documentation/atomic_ops.txt. > > Signed-off-by: Hitoshi Mitake > Cc: Michel Lespinasse > Cc: Darren Hart > Cc: Peter Zijlstra > Cc: Paul Mackerras > Cc: Frederic Weisbecker > --- > tools/perf/util/include/asm/atomic.h | 91 ++++++++++++++++++++++++++++++++++ > 1 files changed, 91 insertions(+), 0 deletions(-) > create mode 100644 tools/perf/util/include/asm/atomic.h > > diff --git a/tools/perf/util/include/asm/atomic.h b/tools/perf/util/include/asm/atomic.h > new file mode 100644 > index 0000000..1cef451 > --- /dev/null > +++ b/tools/perf/util/include/asm/atomic.h > @@ -0,0 +1,91 @@ > +/****************************************************************************** > + * > + * Copyright B) International Business Machines Corp., 2009 B) should be ? (or (C) at the very least), I'm guessing character set issue? Thanks, -- Darren Hart IBM Linux Technology Center Real-Time Linux Team -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/