Re: Six archs are missing atomic_inc_return()
From: David S. Miller
Date: Fri Nov 19 2004 - 01:33:49 EST
On Thu, 18 Nov 2004 20:48:36 -0800
Andrew Morton <akpm@xxxxxxxx> wrote:
> Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> wrote:
> >
> > Six archs do not have the atomic_inc_return() macro as of 2.6.10-rc2:
> >
> > cris
> > h8300
> > m32r
> > ppc
> > ppc64
> > s390
>
> All of these architectures implement atomic_add_return(). So they all need
>
> #define atomic_inc_return(v) atomic_add_return(1, v)
>
> added to their atomic.h.
>
> Wanna send a patch?
Come again? They all seem to have it in current 2.6.x BK as far
as I can tell.
davem@nuts:/disk1/BK/sparc-2.6$ egrep atomic_inc_return include/asm-cris/atomic.h include/asm-h8300/atomic.h include/asm-m32r/atomic.h include/asm-ppc/atomic.h include/asm-ppc64/atomic.h include/asm-s390/atomic.h
include/asm-cris/atomic.h:extern __inline__ int atomic_inc_return(volatile atomic_t *v)
include/asm-h8300/atomic.h:static __inline__ int atomic_inc_return(atomic_t *v)
include/asm-h8300/atomic.h:#define atomic_inc(v) atomic_inc_return(v)
include/asm-h8300/atomic.h:#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
include/asm-m32r/atomic.h: * atomic_inc_return - increment atomic variable and return it
include/asm-m32r/atomic.h:static inline int atomic_inc_return(atomic_t *v)
include/asm-m32r/atomic.h: "# atomic_inc_return \n\t"
include/asm-m32r/atomic.h:#define atomic_inc(v) ((void)atomic_inc_return(v))
include/asm-m32r/atomic.h:#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
include/asm-ppc/atomic.h:static __inline__ int atomic_inc_return(atomic_t *v)
include/asm-ppc/atomic.h:"1: lwarx %0,0,%1 # atomic_inc_return\n\
include/asm-ppc/atomic.h:#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
include/asm-ppc64/atomic.h:static __inline__ int atomic_inc_return(atomic_t *v)
include/asm-ppc64/atomic.h:"1: lwarx %0,0,%1 # atomic_inc_return\n\
include/asm-ppc64/atomic.h:#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
include/asm-s390/atomic.h:static __inline__ int atomic_inc_return(volatile atomic_t * v)
-
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/