From: "David S. Miller" <davem@davemloft.net>
To: Andrew Morton <akpm@osdl.org>
Cc: 76306.1226@compuserve.com, linux-kernel@vger.kernel.org,
alan@lxorguk.ukuu.org.uk, anton@samba.org
Subject: Re: Six archs are missing atomic_inc_return()
Date: Thu, 18 Nov 2004 22:16:56 -0800 [thread overview]
Message-ID: <20041118221656.7ae6ef6f.davem@davemloft.net> (raw)
In-Reply-To: <20041118204836.09d2d738.akpm@osdl.org>
On Thu, 18 Nov 2004 20:48:36 -0800
Andrew Morton <akpm@osdl.org> wrote:
> Chuck Ebbert <76306.1226@compuserve.com> 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)
next prev parent reply other threads:[~2004-11-19 6:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 6:44 Chuck Ebbert
2004-11-18 6:56 ` Anton Blanchard
2004-11-19 4:48 ` Andrew Morton
2004-11-19 6:16 ` David S. Miller [this message]
2004-11-18 23:14 Chuck Ebbert
2004-11-20 20:18 ` Herbert Poetzl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041118221656.7ae6ef6f.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome