Lines Matching refs:local
6 This document explains the purpose of the local atomic operations, how
9 those local variables across CPUs when the order of memory writes matters.
18 * Purpose of local atomic operations
43 not have a different behavior between SMP and UP, including asm-generic/local.h
44 in your architecture's local.h is sufficient.
53 * Rules to follow when using local atomic operations
55 - Variables touched by local ops must be per cpu variables.
57 - This CPU can use local ops from any context (process, irq, softirq, nmi, ...)
59 - Preemption (or interrupts) must be disabled when using local ops in
62 actual local op.
63 - When using local ops in interrupt context, no special care must be
64 taken on a mainline kernel, since they will run on the local CPU with
68 - Reading the local cpu variable will provide the current copy of the
76 * How to use local atomic operations
79 #include <asm/local.h>
88 In preemptible context, use get_cpu_var() and put_cpu_var() around local atomic
104 Those local counters can be read from foreign CPUs to sum the count. Note that
120 Here is a sample module which implements a basic per cpu counter using local.h.
123 /* test-local.c
125 * Sample module for local.h usage.
129 #include <asm/local.h>