[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p737iunhalo.fsf@bingen.suse.de>
Date: 12 Feb 2007 12:35:47 +0100
From: Andi Kleen <ak@...e.de>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> writes:
>
> /**
> @@ -402,7 +405,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t *v)
> */
> #define atomic_add_unless(v, a, u) \
> ({ \
> - int c, old; \
> + __typeof__((v)->counter) c, old; \
This change seems useless. Please drop.
In general you should enforce atomic_t vs atomic64_t types on x86, otherwise
people will write code that won't compile on other architectures
that have truly different implementations.
I would suggest using inlines.
-Andi
-
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