atomic: use <linux/atomic.h>
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
148817ba09
commit
60063497a9
439 changed files with 427 additions and 448 deletions
|
@ -138,8 +138,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
|
|||
return c != u;
|
||||
}
|
||||
|
||||
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
|
||||
|
||||
static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _ASM_GENERIC_LOCAL_H
|
||||
|
||||
#include <linux/percpu.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
/*
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef struct {
|
|||
|
||||
#else /* BITS_PER_LONG != 64 */
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
|
||||
/* Don't use typedef: don't want them to be mixed with atomic_t's. */
|
||||
typedef struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue