mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pranith Kumar <bobby.prani@gmail.com>
To: trivial@kernel.org, jkosina@suse.cz,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-doc@vger.kernel.org (open list:DOCUMENTATION),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/1] doc: atomic-ops.txt: correct return value info about atomic_add_unless
Date: Thu, 26 Jun 2014 11:00:49 -0700	[thread overview]
Message-ID: <1403805649-9830-1-git-send-email-bobby.prani@gmail.com> (raw)

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 Documentation/atomic_ops.txt | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index 68542fe..d3ad657 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -271,16 +271,13 @@ Finally:
 
 	int atomic_add_unless(atomic_t *v, int a, int u);
 
-If the atomic value v is not equal to u, this function adds a to v, and
-returns non zero. If v is equal to u then it returns zero. This is done as
-an atomic operation.
+If the atomic value v is not equal to u, this function adds a to v.
+It returns the old value of v. It is done as an atomic operation.
 
-atomic_add_unless requires explicit memory barriers around the operation
-unless it fails (returns 0).
+atomic_add_unless requires explicit memory barriers around the operation.
 
 atomic_inc_not_zero, equivalent to atomic_add_unless(v, 1, 0)
 
-
 If a caller requires memory barrier semantics around an atomic_t
 operation which does not return a value, a set of interfaces are
 defined which accomplish this:
-- 
1.9.1


                 reply	other threads:[~2014-06-26 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1403805649-9830-1-git-send-email-bobby.prani@gmail.com \
    --to=bobby.prani@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=trivial@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