x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / ia64 / include / asm / sync_bitops.h
blob593c12eeb270fe1b3fed078e1f5bfce51fdf5d2f
1 #ifndef _ASM_IA64_SYNC_BITOPS_H
2 #define _ASM_IA64_SYNC_BITOPS_H
4 /*
5 * Copyright (C) 2008 Isaku Yamahata <yamahata at valinux co jp>
7 * Based on synch_bitops.h which Dan Magenhaimer wrote.
9 * bit operations which provide guaranteed strong synchronisation
10 * when communicating with Xen or other guest OSes running on other CPUs.
13 static inline void sync_set_bit(int nr, volatile void *addr)
15 set_bit(nr, addr);
18 static inline void sync_clear_bit(int nr, volatile void *addr)
20 clear_bit(nr, addr);
23 static inline void sync_change_bit(int nr, volatile void *addr)
25 change_bit(nr, addr);
28 static inline int sync_test_and_set_bit(int nr, volatile void *addr)
30 return test_and_set_bit(nr, addr);
33 static inline int sync_test_and_clear_bit(int nr, volatile void *addr)
35 return test_and_clear_bit(nr, addr);
38 static inline int sync_test_and_change_bit(int nr, volatile void *addr)
40 return test_and_change_bit(nr, addr);
43 static inline int sync_test_bit(int nr, const volatile void *addr)
45 return test_bit(nr, addr);
48 #define sync_cmpxchg(ptr, old, new) \
49 ((__typeof__(*(ptr)))cmpxchg_acq((ptr), (old), (new)))
51 #endif /* _ASM_IA64_SYNC_BITOPS_H */