2 * cmpxchg*() fallbacks for CPU not supporting these instructions
5 #include <linux/kernel.h>
7 #include <linux/module.h>
9 #ifndef CONFIG_X86_CMPXCHG
10 unsigned long cmpxchg_386_u8(volatile void *ptr
, u8 old
, u8
new)
15 /* Poor man's cmpxchg for 386. Unsuitable for SMP */
16 local_irq_save(flags
);
20 local_irq_restore(flags
);
23 EXPORT_SYMBOL(cmpxchg_386_u8
);
25 unsigned long cmpxchg_386_u16(volatile void *ptr
, u16 old
, u16
new)
30 /* Poor man's cmpxchg for 386. Unsuitable for SMP */
31 local_irq_save(flags
);
35 local_irq_restore(flags
);
38 EXPORT_SYMBOL(cmpxchg_386_u16
);
40 unsigned long cmpxchg_386_u32(volatile void *ptr
, u32 old
, u32
new)
45 /* Poor man's cmpxchg for 386. Unsuitable for SMP */
46 local_irq_save(flags
);
50 local_irq_restore(flags
);
53 EXPORT_SYMBOL(cmpxchg_386_u32
);