Skip to content

Commit

Permalink
Some grammatical fixups and additions to atomic.h kernel-doc content
Browse files Browse the repository at this point in the history
Tweak and add content for extractable documentation in asm-i386/atomic.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Robert P. J. Day authored and Linus Torvalds committed May 8, 2007
1 parent 0ba34e1 commit cc38682
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/asm-i386/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cc38682

Please sign in to comment.