Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
cmpxchg.h File Reference
#include <mach/blackfin.h>
#include <asm/irqflags.h>
#include <asm-generic/cmpxchg-local.h>

Go to the source code of this file.

Data Structures

struct  __xchg_dummy
 

Macros

#define __xg(x)   ((volatile struct __xchg_dummy *)(x))
 
#define cmpxchg_local(ptr, o, n)
 
#define cmpxchg64_local(ptr, o, n)   __cmpxchg64_local_generic((ptr), (o), (n))
 
#define cmpxchg(ptr, o, n)   cmpxchg_local((ptr), (o), (n))
 
#define cmpxchg64(ptr, o, n)   cmpxchg64_local((ptr), (o), (n))
 
#define xchg(ptr, x)   ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
 
#define tas(ptr)   ((void)xchg((ptr), 1))
 

Macro Definition Documentation

#define __xg (   x)    ((volatile struct __xchg_dummy *)(x))

Definition at line 80 of file cmpxchg.h.

#define cmpxchg (   ptr,
  o,
  n 
)    cmpxchg_local((ptr), (o), (n))

Definition at line 125 of file cmpxchg.h.

#define cmpxchg64 (   ptr,
  o,
  n 
)    cmpxchg64_local((ptr), (o), (n))

Definition at line 126 of file cmpxchg.h.

#define cmpxchg64_local (   ptr,
  o,
  n 
)    __cmpxchg64_local_generic((ptr), (o), (n))

Definition at line 123 of file cmpxchg.h.

#define cmpxchg_local (   ptr,
  o,
  n 
)
Value:
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
(unsigned long)(n), sizeof(*(ptr))))

Definition at line 120 of file cmpxchg.h.

#define tas (   ptr)    ((void)xchg((ptr), 1))

Definition at line 131 of file cmpxchg.h.

#define xchg (   ptr,
  x 
)    ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))

Definition at line 130 of file cmpxchg.h.