Skip to contentSkip to conversation

doc: atomic-ops.txt: correct return value info about atomic_add_unless

PATCH New Pranith Kumar 1 participant 1 message Jun 26, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: atomic-ops.txt: correct return value info about atomic_add_unless

---
 Documentation/atomic_ops.txt | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
Documentation/atomic_ops.txt +3 -6
index 68542fe..d3ad657 100644
@@ -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:
Signature · 1 line
1.9.1