[PATCH] introduce "local_t" - cpu-local atomic variables
Introduces local_t, a type which is like atomic_t, but the operations are only atomic from a single CPU's point of view (ie. atomic against interrupts and softirqs). Some architectures (eg. i386) can implement these very efficiently. There are special operations for the case of a local operation on a per-cpu variable (which is common), which some architectures can implement efficiently (eg. IA64 keeps all per-cpu variables mapped at the same address, so no address arithmetic is needed). The generic implementation given here simply uses atomics on 32-bit archs, three variables on others. x86 is already implemented specially.
Showing
include/asm-generic/local.h
0 → 100644
include/asm-i386/local.h
0 → 100644
Please register or sign in to comment