From: "David S. Miller" <davem@davemloft.net>
To: nickpiggin@yahoo.com.au
Cc: dhowells@redhat.com, torvalds@osdl.org, akpm@osdl.org,
keyrings@linux-nfs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Keys: Improve usage of memory barriers and remove IRQ disablement
Date: Wed, 05 Apr 2006 15:51:06 -0700 (PDT) [thread overview]
Message-ID: <20060405.155106.125371395.davem@davemloft.net> (raw)
In-Reply-To: <44338CAE.6060206@yahoo.com.au>
From: Nick Piggin <nickpiggin@yahoo.com.au>
Date: Wed, 05 Apr 2006 19:23:58 +1000
> David Howells wrote:
> > Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
> > | int atomic_inc_and_test(atomic_t *v);
> > | int atomic_dec_and_test(atomic_t *v);
> > |
> > | These two routines increment and decrement by 1, respectively, the
> > | given atomic counter. They return a boolean indicating whether the
> > | resulting counter value was zero or not.
> > |
> > | It requires explicit memory barrier semantics around the operation as
> > | above.
> >
> > Note the last paragraph. "It requires" should be "They require", but the
> > sense would seem to be obvious. However, it's not clear on a second reading
> > as to whether this is an instruction to the _caller_ or an instruction to the
> > arch _implementer_.
> >
>
> Yes, I remember Dave M clarified this sometime ago (on lkml I guess). It
> is a little confusing, but I think the wording is for the implementer's
> point of view. Dave will pull me up if I'm wrong...
Any routine which returns state must have the barriers in the arch
implementation. These two routines returns state.
prev parent reply other threads:[~2006-04-05 22:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 9:55 David Howells
2006-04-04 10:23 ` [Keyrings] " David Howells
2006-04-04 10:58 ` Nick Piggin
2006-04-05 8:46 ` David Howells
2006-04-05 9:23 ` Nick Piggin
2006-04-05 22:51 ` David S. Miller [this message]
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=20060405.155106.125371395.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=keyrings@linux-nfs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@osdl.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