From: "Robert P. J. Day" Tweak and add content for extractable documentation in asm-i386/atomic.h. Signed-off-by: Robert P. J. Day Acked-by: Randy Dunlap Signed-off-by: Andrew Morton --- include/asm-i386/atomic.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff -puN include/asm-i386/atomic.h~some-grammatical-fixups-and-additions-to-atomich-kernel-doc include/asm-i386/atomic.h --- a/include/asm-i386/atomic.h~some-grammatical-fixups-and-additions-to-atomich-kernel-doc +++ a/include/asm-i386/atomic.h @@ -51,7 +51,7 @@ static __inline__ void atomic_add(int i, } /** - * atomic_sub - subtract the atomic variable + * atomic_sub - subtract integer from atomic variable * @i: integer value to subtract * @v: pointer of type atomic_t * @@ -170,7 +170,7 @@ static __inline__ int atomic_add_negativ } /** - * atomic_add_return - add and return + * atomic_add_return - add integer and return * @v: pointer of type atomic_t * @i: integer value to add * @@ -202,6 +202,13 @@ no_xadd: /* Legacy 386 processor */ #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); _