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

Go to the source code of this file.

Macros

#define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg)
 
#define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg)
 

Macro Definition Documentation

#define __futex_atomic_op1 (   insn,
  ret,
  oldval,
  uaddr,
  oparg 
)
Value:
do { \
register unsigned long r8 __asm ("r8") = 0; \
__asm__ __volatile__( \
" mf;; \n" \
"[1:] " insn ";; \n" \
" .xdata4 \"__ex_table\", 1b-., 2f-. \n" \
"[2:]" \
: "+r" (r8), "=r" (oldval) \
: "r" (uaddr), "r" (oparg) \
: "memory"); \
ret = r8; \
} while (0)

Definition at line 8 of file futex.h.

#define __futex_atomic_op2 (   insn,
  ret,
  oldval,
  uaddr,
  oparg 
)
Value:
do { \
register unsigned long r8 __asm ("r8") = 0; \
int val, newval; \
do { \
__asm__ __volatile__( \
" mf;; \n" \
"[1:] ld4 %3=[%4];; \n" \
" mov %2=%3 \n" \
insn ";; \n" \
" mov ar.ccv=%2;; \n" \
"[2:] cmpxchg4.acq %1=[%4],%3,ar.ccv;; \n" \
" .xdata4 \"__ex_table\", 1b-., 3f-.\n" \
" .xdata4 \"__ex_table\", 2b-., 3f-.\n" \
"[3:]" \
: "+r" (r8), "=r" (val), "=&r" (oldval), \
"=&r" (newval) \
: "r" (uaddr), "r" (oparg) \
: "memory"); \
if (unlikely (r8)) \
break; \
} while (unlikely (val != oldval)); \
ret = r8; \
} while (0)

Definition at line 22 of file futex.h.