cmpxchg_64.h 486 B

1234567891011121314151617181920212223
  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 cmpxchg64(ptr, o, n) \
  8. ({ \
  9. BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
  10. cmpxchg((ptr), (o), (n)); \
  11. })
  12. #define cmpxchg64_local(ptr, o, n) \
  13. ({ \
  14. BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
  15. cmpxchg_local((ptr), (o), (n)); \
  16. })
  17. #define system_has_cmpxchg_double() cpu_has_cx16
  18. #endif /* _ASM_X86_CMPXCHG_64_H */