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

Go to the source code of this file.

Macros

#define __ASM__MB
 
#define ____xchg(type, args...)   __xchg ## type ## _local(args)
 
#define ____cmpxchg(type, args...)   __cmpxchg ## type ## _local(args)
 
#define xchg_local(ptr, x)
 
#define cmpxchg_local(ptr, o, n)
 
#define cmpxchg64_local(ptr, o, n)
 
#define ____xchg(type, args...)   __xchg ##type(args)
 
#define ____cmpxchg(type, args...)   __cmpxchg ##type(args)
 
#define xchg(ptr, x)
 
#define cmpxchg(ptr, o, n)
 
#define cmpxchg64(ptr, o, n)
 
#define __HAVE_ARCH_CMPXCHG   1
 

Macro Definition Documentation

#define ____cmpxchg (   type,
  args... 
)    __cmpxchg ## type ## _local(args)

Definition at line 42 of file cmpxchg.h.

#define ____cmpxchg (   type,
  args... 
)    __cmpxchg ##type(args)

Definition at line 42 of file cmpxchg.h.

#define ____xchg (   type,
  args... 
)    __xchg ## type ## _local(args)

Definition at line 41 of file cmpxchg.h.

#define ____xchg (   type,
  args... 
)    __xchg ##type(args)

Definition at line 41 of file cmpxchg.h.

#define __ASM__MB

Definition at line 8 of file cmpxchg.h.

#define __HAVE_ARCH_CMPXCHG   1

Definition at line 69 of file cmpxchg.h.

#define cmpxchg (   ptr,
  o,
  n 
)
Value:
({ \
__typeof__(*(ptr)) _o_ = (o); \
__typeof__(*(ptr)) _n_ = (n); \
(__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
(unsigned long)_n_, sizeof(*(ptr)));\
})

Definition at line 52 of file cmpxchg.h.

#define cmpxchg64 (   ptr,
  o,
  n 
)
Value:
({ \
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
cmpxchg((ptr), (o), (n)); \
})

Definition at line 60 of file cmpxchg.h.

#define cmpxchg64_local (   ptr,
  o,
  n 
)
Value:
({ \
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
cmpxchg_local((ptr), (o), (n)); \
})

Definition at line 29 of file cmpxchg.h.

#define cmpxchg_local (   ptr,
  o,
  n 
)
Value:
({ \
__typeof__(*(ptr)) _o_ = (o); \
__typeof__(*(ptr)) _n_ = (n); \
(__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
(unsigned long)_n_, \
sizeof(*(ptr))); \
})

Definition at line 20 of file cmpxchg.h.

#define xchg (   ptr,
  x 
)
Value:
({ \
__typeof__(*(ptr)) _x_ = (x); \
(__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
sizeof(*(ptr))); \
})

Definition at line 45 of file cmpxchg.h.

#define xchg_local (   ptr,
  x 
)
Value:
({ \
__typeof__(*(ptr)) _x_ = (x); \
(__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
sizeof(*(ptr))); \
})

Definition at line 13 of file cmpxchg.h.