mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
b33eb50a92
The ${atomic}_dec_if_positive() ops are unlike all the other conditional
atomic ops. Rather than returning a boolean success value, these return
the value that the atomic variable would be updated to, even when no
update is performed.
We missed this when adding kerneldoc comments, and the documentation for
${atomic}_dec_if_positive() erroneously states:
| Return: @true if @v was updated, @false otherwise.
Ideally we'd clean this up by aligning ${atomic}_dec_if_positive() with
the usual atomic op conventions: with ${atomic}_fetch_dec_if_positive()
for those who care about the value of the varaible, and
${atomic}_dec_if_positive() returning a boolean success value.
In the mean time, align the documentation with the current reality.
Fixes:
|
||
---|---|---|
.. | ||
add | ||
add_negative | ||
add_unless | ||
and | ||
andnot | ||
cmpxchg | ||
dec | ||
dec_and_test | ||
dec_if_positive | ||
dec_unless_positive | ||
inc | ||
inc_and_test | ||
inc_not_zero | ||
inc_unless_negative | ||
or | ||
read | ||
set | ||
sub | ||
sub_and_test | ||
try_cmpxchg | ||
xchg | ||
xor |