Commit b67405bb authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

h8300 atomic.h update

add atomic_sub_and_test define.
Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 218f0aae
...@@ -37,6 +37,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) ...@@ -37,6 +37,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
} }
#define atomic_sub(i, v) atomic_sub_return(i, v) #define atomic_sub(i, v) atomic_sub_return(i, v)
#define atomic_sub_and_test(i,v) (atomic_sub_return(i, v) == 0)
static __inline__ int atomic_inc_return(atomic_t *v) static __inline__ int atomic_inc_return(atomic_t *v)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment