From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-arch@vger.kernel.org
Subject: Re: atomic ops for a VM fix
Date: Fri, 14 May 2004 01:52:22 +0400 [thread overview]
Message-ID: <20040514015222.A1569@den.park.msu.ru> (raw)
In-Reply-To: <20040513133526.0e5efed3.akpm@osdl.org>; from akpm@osdl.org on Thu, May 13, 2004 at 01:35:26PM -0700
On Thu, May 13, 2004 at 01:35:26PM -0700, Andrew Morton wrote:
> They require that the architecture implement atomic_add_negative() and
> atomic_inc_and_test(). I managed to cobble these together for many
> architectures, but there are a few gaps. Please review the third and
> fourth patches.
It seems atomic_inc_and_test() is missing on alpha.
Ivan.
--- 2.6/include/asm-alpha/atomic.h Mon May 10 06:32:52 2004
+++ linux/include/asm-alpha/atomic.h Fri May 14 01:41:57 2004
@@ -178,6 +178,7 @@ static __inline__ long atomic64_sub_retu
#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0)
+#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
next prev parent reply other threads:[~2004-05-13 21:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-13 20:35 atomic ops for a VM fix Andrew Morton
2004-05-13 20:37 ` Andrew Morton
2004-05-13 21:52 ` Ivan Kokshaysky [this message]
2004-05-13 22:33 ` David Mosberger
2004-05-13 22:52 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2004-05-14 11:36 Martin Schwidefsky
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=20040514015222.A1569@den.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=akpm@osdl.org \
--cc=linux-arch@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