X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-cris%2Fsystem.h;h=5bcfe5a1090765e7359c4f64f0de4001597f3241;hb=d91ab4e7df0c0c9f98c830e04e875f39d41b21f6;hp=fea0e8d57cb51883f5d0c31202ef33ed089f863d;hpb=60f29b1e1600d89aee5e529acb4b276a6650cb8b;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index fea0e8d57cb..5bcfe5a1090 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h @@ -66,6 +66,21 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz return x; } +#include + +/* + * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make + * them available. + */ +#define cmpxchg_local(ptr, o, n) \ + ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ + (unsigned long)(n), sizeof(*(ptr)))) +#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) + +#ifndef CONFIG_SMP +#include +#endif + #define arch_align_stack(x) (x) void default_idle(void);