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/compiler.h>
#include <linux/types.h>
#include <asm/processor.h>
#include <asm/alternative.h>
#include <asm/cmpxchg.h>
#include <asm/atomic64_64.h>

Go to the source code of this file.

Macros

#define ATOMIC_INIT(i)   { (i) }
 
#define atomic_inc_return(v)   (atomic_add_return(1, v))
 
#define atomic_dec_return(v)   (atomic_sub_return(1, v))
 
#define atomic_clear_mask(mask, addr)
 
#define atomic_set_mask(mask, addr)
 
#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 atomic_clear_mask (   mask,
  addr 
)
Value:
asm volatile(LOCK_PREFIX "andl %0,%1" \
: : "r" (~(mask)), "m" (*(addr)) : "memory")

Definition at line 272 of file atomic.h.

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

Definition at line 207 of file atomic.h.

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

Definition at line 206 of file atomic.h.

#define ATOMIC_INIT (   i)    { (i) }

Definition at line 15 of file atomic.h.

#define atomic_set_mask (   mask,
  addr 
)
Value:
asm volatile(LOCK_PREFIX "orl %0,%1" \
: : "r" ((unsigned)(mask)), "m" (*(addr)) \
: "memory")

Definition at line 276 of file atomic.h.

#define smp_mb__after_atomic_dec ( )    barrier()

Definition at line 283 of file atomic.h.

#define smp_mb__after_atomic_inc ( )    barrier()

Definition at line 285 of file atomic.h.

#define smp_mb__before_atomic_dec ( )    barrier()

Definition at line 282 of file atomic.h.

#define smp_mb__before_atomic_inc ( )    barrier()

Definition at line 284 of file atomic.h.