Re: [PATCH 1/2] atomic.h atomic64_t standardization for 2.6.19

2006-12-05 Thread Mathieu Desnoyers
Hi, Here is the 2.6.19-friendly diff of the atomic.h atomic64_t standardization. As it seems to be useful to at least one locking primitive (rwsem) in addition of LTTng (which is not in the mainline though), I think it should be considered for inclusion. Regards, Mathieu ---BEGIN--- --- a/inclu

Re: [PATCH 1/2] atomic.h atomic64_t standardization

2006-12-01 Thread Nick Piggin
Mathieu Desnoyers wrote: Hi, I finalized the work for atomic64_t cmpxchg and atomic64_add_unless on all architectures. asm-generic/atomic.h atomic_long_t is also streamlined. Review is welcome. Beautiful! Now I can do the rwsem consolidation. Thanks. Nick -- SUSE Labs, Novell Inc. Send inst

Re: [PATCH 1/2] atomic.h atomic64_t standardization

2006-12-01 Thread Mathieu Desnoyers
Hi, I finalized the work for atomic64_t cmpxchg and atomic64_add_unless on all architectures. asm-generic/atomic.h atomic_long_t is also streamlined. Review is welcome. Mathieu ---BEGIN--- --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h @@ -175,19 +175,64 @@ static __inline__

Re: [PATCH 1/2] atomic.h atomic64_t standardization

2006-11-30 Thread Mathieu Desnoyers
* Paul Mundt ([EMAIL PROTECTED]) wrote: > On Thu, Nov 30, 2006 at 10:11:53PM -0500, Mathieu Desnoyers wrote: > > --- a/include/asm-generic/atomic.h > > +++ b/include/asm-generic/atomic.h > [snip] > > +#if 0 > > +/* Atomic add unless is only effective on atomic_t on powerpc (at least) */ > > +static

Re: [PATCH 1/2] atomic.h atomic64_t standardization

2006-11-30 Thread Paul Mundt
On Thu, Nov 30, 2006 at 10:11:53PM -0500, Mathieu Desnoyers wrote: > --- a/include/asm-generic/atomic.h > +++ b/include/asm-generic/atomic.h [snip] > +#if 0 > +/* Atomic add unless is only effective on atomic_t on powerpc (at least) */ > +static inline long atomic_long_add_unless(atomic_long_t *l,

Re: [PATCH 1/2] atomic.h atomic64_t standardization

2006-11-30 Thread Mathieu Desnoyers
New version, fixes PowerPC typo. --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h @@ -207,8 +207,9 @@ static __inline__ int atomic_sub_return( return atomic_add_return(-i,v); } -#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) -#define atomic

[PATCH 1/2] atomic.h atomic64_t standardization

2006-11-30 Thread Mathieu Desnoyers
* Christoph Hellwig ([EMAIL PROTECTED]) wrote: > We already have local_t in asm/local.h for this purposed. Unfortunately > several architecture implementations are rather suboptimal, but I'm sure > the architecture maintainers would be interested in patches to optimize > the various implementation