Re: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
- From: Andi Kleen <ak@xxxxxxx>
- Date: 12 Feb 2007 12:35:47 +0100
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
- From: Mathieu Desnoyers
- Re: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
- References:
- [PATCH 00/10] atomic.h : standardizing atomic primitives
- From: Mathieu Desnoyers
- [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
- From: Mathieu Desnoyers
- [PATCH 00/10] atomic.h : standardizing atomic primitives
- Prev by Date: Re: [GIT PATCH] SCSI updates for 2.6.20
- Next by Date: Re: [take35 0/10] kevent: Generic event handling mechanism.
- Previous by thread: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
- Next by thread: Re: [PATCH 10/10] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64
- Index(es):
Relevant Pages
|