2008-10-23 05:26:29 +00:00
|
|
|
#ifndef _ASM_X86_CMPXCHG_64_H
|
|
|
|
#define _ASM_X86_CMPXCHG_64_H
|
2007-05-08 07:35:02 +00:00
|
|
|
|
2011-08-18 18:40:22 +00:00
|
|
|
static inline void set_64bit(volatile u64 *ptr, u64 val)
|
|
|
|
{
|
|
|
|
*ptr = val;
|
|
|
|
}
|
|
|
|
|
2009-10-09 08:12:46 +00:00
|
|
|
#define __HAVE_ARCH_CMPXCHG 1
|
2007-05-08 07:35:02 +00:00
|
|
|
|
2008-02-07 08:16:10 +00:00
|
|
|
#define cmpxchg64(ptr, o, n) \
|
2008-03-23 08:01:52 +00:00
|
|
|
({ \
|
2008-02-07 08:16:10 +00:00
|
|
|
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
|
|
|
cmpxchg((ptr), (o), (n)); \
|
2008-03-23 08:01:52 +00:00
|
|
|
})
|
2009-10-09 08:12:46 +00:00
|
|
|
|
2008-02-07 08:16:10 +00:00
|
|
|
#define cmpxchg64_local(ptr, o, n) \
|
2008-03-23 08:01:52 +00:00
|
|
|
({ \
|
2008-02-07 08:16:10 +00:00
|
|
|
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
|
|
|
cmpxchg_local((ptr), (o), (n)); \
|
2008-03-23 08:01:52 +00:00
|
|
|
})
|
2007-05-08 07:35:02 +00:00
|
|
|
|
2011-06-01 17:25:47 +00:00
|
|
|
#define system_has_cmpxchg_double() cpu_has_cx16
|
|
|
|
|
2008-10-23 05:26:29 +00:00
|
|
|
#endif /* _ASM_X86_CMPXCHG_64_H */
|