[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18907.14029.301492.493938@cargo.ozlabs.ibm.com>
Date: Tue, 7 Apr 2009 21:19:41 +1000
From: Paul Mackerras <paulus@...ba.org>
To: mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
a.p.zijlstra@...llo.nl, tglx@...utronix.de, mingo@...e.hu
Cc: linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/core] x86, perfcounters: add atomic64_xchg()
Ingo Molnar writes:
> Complete atomic64_t support on the 32-bit side by adding atomic64_xch().
>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> LKML-Reference: <20090406094518.445450972@...llo.nl>
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
>
>
> ---
> arch/x86/include/asm/atomic_32.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/include/asm/atomic_32.h b/arch/x86/include/asm/atomic_32.h
> index 977250e..a9fef6c 100644
> --- a/arch/x86/include/asm/atomic_32.h
> +++ b/arch/x86/include/asm/atomic_32.h
> @@ -306,6 +306,12 @@ static inline void atomic64_set(atomic64_t *ptr, unsigned long long new_val)
> } while (atomic64_cmpxchg(ptr, old_val, new_val) != old_val);
> }
>
> +static inline void
> +atomic64_xchg(atomic64_t *ptr, unsigned long long new_val)
> +{
> + atomic64_set(ptr, new_val);
> +}
Umm, I don't know much about x86, but that doesn't look like an
exchange operation to me... Shouldn't it return a value, for a start?
Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists