aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/atomic.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h
index b9fd03cef51e..0baa2f89463c 100644
--- a/include/asm-i386/atomic.h
+++ b/include/asm-i386/atomic.h
@@ -52,7 +52,7 @@ static __inline__ void atomic_add(int i, atomic_t *v)
52} 52}
53 53
54/** 54/**
55 * atomic_sub - subtract the atomic variable 55 * atomic_sub - subtract integer from atomic variable
56 * @i: integer value to subtract 56 * @i: integer value to subtract
57 * @v: pointer of type atomic_t 57 * @v: pointer of type atomic_t
58 * 58 *
@@ -171,7 +171,7 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v)
171} 171}
172 172
173/** 173/**
174 * atomic_add_return - add and return 174 * atomic_add_return - add integer and return
175 * @v: pointer of type atomic_t 175 * @v: pointer of type atomic_t
176 * @i: integer value to add 176 * @i: integer value to add
177 * 177 *
@@ -203,6 +203,13 @@ no_xadd: /* Legacy 386 processor */
203#endif 203#endif
204} 204}
205 205
206/**
207 * atomic_sub_return - subtract integer and return
208 * @v: pointer of type atomic_t
209 * @i: integer value to subtract
210 *
211 * Atomically subtracts @i from @v and returns @v - @i
212 */
206static __inline__ int atomic_sub_return(int i, atomic_t *v) 213static __inline__ int atomic_sub_return(int i, atomic_t *v)
207{ 214{
208 return atomic_add_return(-i,v); 215 return atomic_add_return(-i,v);