Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
atomic.h File Reference
#include <linux/types.h>
#include <linux/irqflags.h>
#include <asm/cmpxchg.h>

Go to the source code of this file.

Macros

#define ATOMIC_INIT(i)   { (i) }
 
#define atomic_read(v)   (*(volatile int *)&(v)->counter)
 
#define atomic_set(v, i)   (((v)->counter) = i)
 
#define ASM_DI   "di"
 
#define atomic_dec_return(v)   atomic_sub_return(1, (v))
 
#define atomic_inc_return(v)   atomic_add_return(1, (v))
 
#define smp_mb__before_atomic_dec()   barrier()
 
#define smp_mb__after_atomic_dec()   barrier()
 
#define smp_mb__before_atomic_inc()   barrier()
 
#define smp_mb__after_atomic_inc()   barrier()
 

Macro Definition Documentation

#define ASM_DI   "di"

Definition at line 29 of file atomic.h.

#define atomic_dec_return (   v)    atomic_sub_return(1, (v))

Definition at line 166 of file atomic.h.

#define atomic_inc_return (   v)    atomic_add_return(1, (v))

Definition at line 167 of file atomic.h.

#define ATOMIC_INIT (   i)    { (i) }

Definition at line 17 of file atomic.h.

#define atomic_read (   v)    (*(volatile int *)&(v)->counter)

Definition at line 19 of file atomic.h.

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

Definition at line 20 of file atomic.h.

#define smp_mb__after_atomic_dec ( )    barrier()

Definition at line 215 of file atomic.h.

#define smp_mb__after_atomic_inc ( )    barrier()

Definition at line 217 of file atomic.h.

#define smp_mb__before_atomic_dec ( )    barrier()

Definition at line 214 of file atomic.h.

#define smp_mb__before_atomic_inc ( )    barrier()

Definition at line 216 of file atomic.h.