cmpxchg_64.h 517 B

1234567891011121314151617181920212223242526
  1. #ifndef _ASM_X86_CMPXCHG_64_H
  2. #define _ASM_X86_CMPXCHG_64_H
  3. static inline void set_64bit(volatile u64 *ptr, u64 val)
  4. {
  5. *ptr = val;
  6. }
  7. #define __HAVE_ARCH_CMPXCHG 1
  8. #define cmpxchg64(ptr, o, n) \
  9. ({ \
  10. BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
  11. cmpxchg((ptr), (o), (n)); \
  12. })
  13. #define cmpxchg64_local(ptr, o, n) \
  14. ({ \
  15. BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
  16. cmpxchg_local((ptr), (o), (n)); \
  17. })
  18. #define system_has_cmpxchg_double() cpu_has_cx16
  19. #endif /* _ASM_X86_CMPXCHG_64_H */