From 690be38b3fa4ffc7b5512460c3573ab43c4b80b6 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 8 May 2007 00:35:08 -0700 Subject: [PATCH] --- yaml --- r: 54809 b: refs/heads/master c: cc38682f356f95ca0e409679b76db46af6036460 h: refs/heads/master i: 54807: 34414351c5879095fe42bad86394d059d9fc6701 v: v3 --- [refs] | 2 +- trunk/include/asm-i386/atomic.h | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f1a213aca02e..aeca17e77725 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ba34e197a45c1639aa56aea0399e97f827abb35 +refs/heads/master: cc38682f356f95ca0e409679b76db46af6036460 diff --git a/trunk/include/asm-i386/atomic.h b/trunk/include/asm-i386/atomic.h index b9fd03cef51e..0baa2f89463c 100644 --- a/trunk/include/asm-i386/atomic.h +++ b/trunk/include/asm-i386/atomic.h @@ -52,7 +52,7 @@ static __inline__ void atomic_add(int i, atomic_t *v) } /** - * atomic_sub - subtract the atomic variable + * atomic_sub - subtract integer from atomic variable * @i: integer value to subtract * @v: pointer of type atomic_t * @@ -171,7 +171,7 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) } /** - * atomic_add_return - add and return + * atomic_add_return - add integer and return * @v: pointer of type atomic_t * @i: integer value to add * @@ -203,6 +203,13 @@ static __inline__ int atomic_add_return(int i, atomic_t *v) #endif } +/** + * atomic_sub_return - subtract integer and return + * @v: pointer of type atomic_t + * @i: integer value to subtract + * + * Atomically subtracts @i from @v and returns @v - @i + */ static __inline__ int atomic_sub_return(int i, atomic_t *v) { return atomic_add_return(-i,v);