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

Go to the source code of this file.

Macros

#define __my_cpu_offset   S390_lowcore.percpu_offset
 
#define arch_this_cpu_to_op(pcp, val, op)
 
#define this_cpu_add_1(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_2(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_4(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_8(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_return_1(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_return_2(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_return_4(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_add_return_8(pcp, val)   arch_this_cpu_to_op(pcp, val, +)
 
#define this_cpu_and_1(pcp, val)   arch_this_cpu_to_op(pcp, val, &)
 
#define this_cpu_and_2(pcp, val)   arch_this_cpu_to_op(pcp, val, &)
 
#define this_cpu_and_4(pcp, val)   arch_this_cpu_to_op(pcp, val, &)
 
#define this_cpu_and_8(pcp, val)   arch_this_cpu_to_op(pcp, val, &)
 
#define this_cpu_or_1(pcp, val)   arch_this_cpu_to_op(pcp, val, |)
 
#define this_cpu_or_2(pcp, val)   arch_this_cpu_to_op(pcp, val, |)
 
#define this_cpu_or_4(pcp, val)   arch_this_cpu_to_op(pcp, val, |)
 
#define this_cpu_or_8(pcp, val)   arch_this_cpu_to_op(pcp, val, |)
 
#define this_cpu_xor_1(pcp, val)   arch_this_cpu_to_op(pcp, val, ^)
 
#define this_cpu_xor_2(pcp, val)   arch_this_cpu_to_op(pcp, val, ^)
 
#define this_cpu_xor_4(pcp, val)   arch_this_cpu_to_op(pcp, val, ^)
 
#define this_cpu_xor_8(pcp, val)   arch_this_cpu_to_op(pcp, val, ^)
 
#define arch_this_cpu_cmpxchg(pcp, oval, nval)
 
#define this_cpu_cmpxchg_1(pcp, oval, nval)   arch_this_cpu_cmpxchg(pcp, oval, nval)
 
#define this_cpu_cmpxchg_2(pcp, oval, nval)   arch_this_cpu_cmpxchg(pcp, oval, nval)
 
#define this_cpu_cmpxchg_4(pcp, oval, nval)   arch_this_cpu_cmpxchg(pcp, oval, nval)
 
#define this_cpu_cmpxchg_8(pcp, oval, nval)   arch_this_cpu_cmpxchg(pcp, oval, nval)
 
#define arch_this_cpu_xchg(pcp, nval)
 
#define this_cpu_xchg_1(pcp, nval)   arch_this_cpu_xchg(pcp, nval)
 
#define this_cpu_xchg_2(pcp, nval)   arch_this_cpu_xchg(pcp, nval)
 
#define this_cpu_xchg_4(pcp, nval)   arch_this_cpu_xchg(pcp, nval)
 
#define arch_this_cpu_cmpxchg_double(pcp1, pcp2, o1, o2, n1, n2)
 
#define this_cpu_cmpxchg_double_4   arch_this_cpu_cmpxchg_double
 

Macro Definition Documentation

#define __my_cpu_offset   S390_lowcore.percpu_offset

Definition at line 11 of file percpu.h.

#define arch_this_cpu_cmpxchg (   pcp,
  oval,
  nval 
)
Value:
({ \
typedef typeof(pcp) pcp_op_T__; \
pcp_op_T__ ret__; \
pcp_op_T__ *ptr__; \
ptr__ = __this_cpu_ptr(&(pcp)); \
switch (sizeof(*ptr__)) { \
case 8: \
ret__ = cmpxchg64(ptr__, oval, nval); \
break; \
default: \
ret__ = cmpxchg(ptr__, oval, nval); \
} \
preempt_enable(); \
ret__; \
})

Definition at line 70 of file percpu.h.

#define arch_this_cpu_cmpxchg_double (   pcp1,
  pcp2,
  o1,
  o2,
  n1,
  n2 
)
Value:
({ \
typeof(pcp1) o1__ = (o1), n1__ = (n1); \
typeof(pcp2) o2__ = (o2), n2__ = (n2); \
typeof(pcp1) *p1__; \
typeof(pcp2) *p2__; \
int ret__; \
p1__ = __this_cpu_ptr(&(pcp1)); \
p2__ = __this_cpu_ptr(&(pcp2)); \
ret__ = __cmpxchg_double(p1__, p2__, o1__, o2__, n1__, n2__); \
ret__; \
})

Definition at line 111 of file percpu.h.

#define arch_this_cpu_to_op (   pcp,
  val,
  op 
)
Value:
({ \
typedef typeof(pcp) pcp_op_T__; \
pcp_op_T__ old__, new__, prev__; \
pcp_op_T__ *ptr__; \
ptr__ = __this_cpu_ptr(&(pcp)); \
prev__ = *ptr__; \
do { \
old__ = prev__; \
new__ = old__ op (val); \
switch (sizeof(*ptr__)) { \
case 8: \
prev__ = cmpxchg64(ptr__, old__, new__); \
break; \
default: \
prev__ = cmpxchg(ptr__, old__, new__); \
} \
} while (prev__ != old__); \
preempt_enable(); \
new__; \
})

Definition at line 22 of file percpu.h.

#define arch_this_cpu_xchg (   pcp,
  nval 
)
Value:
({ \
typeof(pcp) *ptr__; \
typeof(pcp) ret__; \
ptr__ = __this_cpu_ptr(&(pcp)); \
ret__ = xchg(ptr__, nval); \
ret__; \
})

Definition at line 93 of file percpu.h.

#define this_cpu_add_1 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 45 of file percpu.h.

#define this_cpu_add_2 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 46 of file percpu.h.

#define this_cpu_add_4 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 47 of file percpu.h.

#define this_cpu_add_8 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 48 of file percpu.h.

#define this_cpu_add_return_1 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 50 of file percpu.h.

#define this_cpu_add_return_2 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 51 of file percpu.h.

#define this_cpu_add_return_4 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 52 of file percpu.h.

#define this_cpu_add_return_8 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, +)

Definition at line 53 of file percpu.h.

#define this_cpu_and_1 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, &)

Definition at line 55 of file percpu.h.

#define this_cpu_and_2 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, &)

Definition at line 56 of file percpu.h.

#define this_cpu_and_4 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, &)

Definition at line 57 of file percpu.h.

#define this_cpu_and_8 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, &)

Definition at line 58 of file percpu.h.

#define this_cpu_cmpxchg_1 (   pcp,
  oval,
  nval 
)    arch_this_cpu_cmpxchg(pcp, oval, nval)

Definition at line 88 of file percpu.h.

#define this_cpu_cmpxchg_2 (   pcp,
  oval,
  nval 
)    arch_this_cpu_cmpxchg(pcp, oval, nval)

Definition at line 89 of file percpu.h.

#define this_cpu_cmpxchg_4 (   pcp,
  oval,
  nval 
)    arch_this_cpu_cmpxchg(pcp, oval, nval)

Definition at line 90 of file percpu.h.

#define this_cpu_cmpxchg_8 (   pcp,
  oval,
  nval 
)    arch_this_cpu_cmpxchg(pcp, oval, nval)

Definition at line 91 of file percpu.h.

#define this_cpu_cmpxchg_double_4   arch_this_cpu_cmpxchg_double

Definition at line 126 of file percpu.h.

#define this_cpu_or_1 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, |)

Definition at line 60 of file percpu.h.

#define this_cpu_or_2 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, |)

Definition at line 61 of file percpu.h.

#define this_cpu_or_4 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, |)

Definition at line 62 of file percpu.h.

#define this_cpu_or_8 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, |)

Definition at line 63 of file percpu.h.

#define this_cpu_xchg_1 (   pcp,
  nval 
)    arch_this_cpu_xchg(pcp, nval)

Definition at line 104 of file percpu.h.

#define this_cpu_xchg_2 (   pcp,
  nval 
)    arch_this_cpu_xchg(pcp, nval)

Definition at line 105 of file percpu.h.

#define this_cpu_xchg_4 (   pcp,
  nval 
)    arch_this_cpu_xchg(pcp, nval)

Definition at line 106 of file percpu.h.

#define this_cpu_xor_1 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, ^)

Definition at line 65 of file percpu.h.

#define this_cpu_xor_2 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, ^)

Definition at line 66 of file percpu.h.

#define this_cpu_xor_4 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, ^)

Definition at line 67 of file percpu.h.

#define this_cpu_xor_8 (   pcp,
  val 
)    arch_this_cpu_to_op(pcp, val, ^)

Definition at line 68 of file percpu.h.