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

Go to the source code of this file.

Macros

#define __xchg(x, ptr, size)
 
#define xchg(ptr, x)   ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr))))
 
#define __HAVE_ARCH_CMPXCHG   1
 
#define ia64_cmpxchg(sem, ptr, old, new, size)
 
#define cmpxchg_acq(ptr, o, n)   ia64_cmpxchg(acq, (ptr), (o), (n), sizeof(*(ptr)))
 
#define cmpxchg_rel(ptr, o, n)   ia64_cmpxchg(rel, (ptr), (o), (n), sizeof(*(ptr)))
 
#define cmpxchg(ptr, o, n)   cmpxchg_acq((ptr), (o), (n))
 
#define cmpxchg64(ptr, o, n)   cmpxchg_acq((ptr), (o), (n))
 
#define cmpxchg_local   cmpxchg
 
#define cmpxchg64_local   cmpxchg64
 
#define CMPXCHG_BUGCHECK_DECL
 
#define CMPXCHG_BUGCHECK(v)
 

Functions

void ia64_xchg_called_with_bad_pointer (void)
 
long ia64_cmpxchg_called_with_bad_pointer (void)
 

Macro Definition Documentation

#define __HAVE_ARCH_CMPXCHG   1

Definition at line 64 of file cmpxchg.h.

#define __xchg (   x,
  ptr,
  size 
)
Value:
({ \
unsigned long __xchg_result; \
\
switch (size) { \
case 1: \
__xchg_result = ia64_xchg1((__u8 *)ptr, x); \
break; \
\
case 2: \
__xchg_result = ia64_xchg2((__u16 *)ptr, x); \
break; \
\
case 4: \
__xchg_result = ia64_xchg4((__u32 *)ptr, x); \
break; \
\
case 8: \
__xchg_result = ia64_xchg8((__u64 *)ptr, x); \
break; \
default: \
ia64_xchg_called_with_bad_pointer(); \
} \
__xchg_result; \
})

Definition at line 29 of file cmpxchg.h.

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

Definition at line 122 of file cmpxchg.h.

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

Definition at line 123 of file cmpxchg.h.

#define cmpxchg64_local   cmpxchg64

Definition at line 126 of file cmpxchg.h.

#define cmpxchg_acq (   ptr,
  o,
  n 
)    ia64_cmpxchg(acq, (ptr), (o), (n), sizeof(*(ptr)))

Definition at line 116 of file cmpxchg.h.

#define CMPXCHG_BUGCHECK (   v)

Definition at line 142 of file cmpxchg.h.

#define CMPXCHG_BUGCHECK_DECL

Definition at line 141 of file cmpxchg.h.

#define cmpxchg_local   cmpxchg

Definition at line 125 of file cmpxchg.h.

#define cmpxchg_rel (   ptr,
  o,
  n 
)    ia64_cmpxchg(rel, (ptr), (o), (n), sizeof(*(ptr)))

Definition at line 118 of file cmpxchg.h.

#define ia64_cmpxchg (   sem,
  ptr,
  old,
  new,
  size 
)

Definition at line 72 of file cmpxchg.h.

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

Definition at line 55 of file cmpxchg.h.

Function Documentation

long ia64_cmpxchg_called_with_bad_pointer ( void  )
void ia64_xchg_called_with_bad_pointer ( void  )