Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
atomic_64.h File Reference
#include <asm/barrier.h>
#include <arch/spr_def.h>

Go to the source code of this file.

Macros

#define atomic_set(v, i)   ((v)->counter = (i))
 
#define ATOMIC64_INIT(i)   { (i) }
 
#define atomic64_read(v)   ((v)->counter)
 
#define atomic64_set(v, i)   ((v)->counter = (i))
 
#define atomic64_sub_return(i, v)   atomic64_add_return(-(i), (v))
 
#define atomic64_sub(i, v)   atomic64_add(-(i), (v))
 
#define atomic64_inc_return(v)   atomic64_add_return(1, (v))
 
#define atomic64_dec_return(v)   atomic64_sub_return(1, (v))
 
#define atomic64_inc(v)   atomic64_add(1, (v))
 
#define atomic64_dec(v)   atomic64_sub(1, (v))
 
#define atomic64_inc_and_test(v)   (atomic64_inc_return(v) == 0)
 
#define atomic64_dec_and_test(v)   (atomic64_dec_return(v) == 0)
 
#define atomic64_sub_and_test(i, v)   (atomic64_sub_return((i), (v)) == 0)
 
#define atomic64_add_negative(i, v)   (atomic64_add_return((i), (v)) < 0)
 
#define atomic64_inc_not_zero(v)   atomic64_add_unless((v), 1, 0)
 
#define smp_mb__before_atomic_dec()   smp_mb()
 
#define smp_mb__after_atomic_dec()   smp_mb()
 
#define smp_mb__before_atomic_inc()   smp_mb()
 
#define smp_mb__after_atomic_inc()   smp_mb()
 
#define __HAVE_ARCH_CMPXCHG
 

Macro Definition Documentation

#define __HAVE_ARCH_CMPXCHG

Definition at line 153 of file atomic_64.h.

#define atomic64_add_negative (   i,
  v 
)    (atomic64_add_return((i), (v)) < 0)

Definition at line 142 of file atomic_64.h.

#define atomic64_dec (   v)    atomic64_sub(1, (v))

Definition at line 137 of file atomic_64.h.

#define atomic64_dec_and_test (   v)    (atomic64_dec_return(v) == 0)

Definition at line 140 of file atomic_64.h.

#define atomic64_dec_return (   v)    atomic64_sub_return(1, (v))

Definition at line 135 of file atomic_64.h.

#define atomic64_inc (   v)    atomic64_add(1, (v))

Definition at line 136 of file atomic_64.h.

#define atomic64_inc_and_test (   v)    (atomic64_inc_return(v) == 0)

Definition at line 139 of file atomic_64.h.

#define atomic64_inc_not_zero (   v)    atomic64_add_unless((v), 1, 0)

Definition at line 144 of file atomic_64.h.

#define atomic64_inc_return (   v)    atomic64_add_return(1, (v))

Definition at line 134 of file atomic_64.h.

#define ATOMIC64_INIT (   i)    { (i) }

Definition at line 82 of file atomic_64.h.

#define atomic64_read (   v)    ((v)->counter)

Definition at line 84 of file atomic_64.h.

#define atomic64_set (   v,
  i 
)    ((v)->counter = (i))

Definition at line 85 of file atomic_64.h.

#define atomic64_sub (   i,
  v 
)    atomic64_add(-(i), (v))

Definition at line 133 of file atomic_64.h.

#define atomic64_sub_and_test (   i,
  v 
)    (atomic64_sub_return((i), (v)) == 0)

Definition at line 141 of file atomic_64.h.

#define atomic64_sub_return (   i,
  v 
)    atomic64_add_return(-(i), (v))

Definition at line 132 of file atomic_64.h.

#define atomic_set (   v,
  i 
)    ((v)->counter = (i))

Definition at line 27 of file atomic_64.h.

#define smp_mb__after_atomic_dec ( )    smp_mb()

Definition at line 148 of file atomic_64.h.

#define smp_mb__after_atomic_inc ( )    smp_mb()

Definition at line 150 of file atomic_64.h.

#define smp_mb__before_atomic_dec ( )    smp_mb()

Definition at line 147 of file atomic_64.h.

#define smp_mb__before_atomic_inc ( )    smp_mb()

Definition at line 149 of file atomic_64.h.