aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/atomic.h')
-rw-r--r--include/asm-mips/atomic.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h
index 2c87b41e69ba..55c37c106ef0 100644
--- a/include/asm-mips/atomic.h
+++ b/include/asm-mips/atomic.h
@@ -231,11 +231,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
231} 231}
232 232
233/* 233/*
234 * atomic_sub_if_positive - add integer to atomic variable 234 * atomic_sub_if_positive - conditionally subtract integer from atomic variable
235 * @i: integer value to subtract
235 * @v: pointer of type atomic_t 236 * @v: pointer of type atomic_t
236 * 237 *
237 * Atomically test @v and decrement if it is greater than 0. 238 * Atomically test @v and subtract @i if @v is greater or equal than @i.
238 * The function returns the old value of @v minus 1. 239 * The function returns the old value of @v minus @i.
239 */ 240 */
240static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) 241static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
241{ 242{
@@ -577,11 +578,12 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
577} 578}
578 579
579/* 580/*
580 * atomic64_sub_if_positive - add integer to atomic variable 581 * atomic64_sub_if_positive - conditionally subtract integer from atomic variable
582 * @i: integer value to subtract
581 * @v: pointer of type atomic64_t 583 * @v: pointer of type atomic64_t
582 * 584 *
583 * Atomically test @v and decrement if it is greater than 0. 585 * Atomically test @v and subtract @i if @v is greater or equal than @i.
584 * The function returns the old value of @v minus 1. 586 * The function returns the old value of @v minus @i.
585 */ 587 */
586static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) 588static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
587{ 589{