diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-08 22:01:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-08 22:01:20 +0000 |
commit | af4fed50455736d86ba05d2fbd344882cb50c28d (patch) | |
tree | b8e6062efce20453c6ee19ae11913a6b3a17f403 /sys/dev/pci | |
parent | 19e3df37b318062b0715c1084f6acc15c569f230 (diff) |
add cmpxchg() with same implementation as atomic_cmpxchg()
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/include/linux/atomic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/linux/atomic.h b/sys/dev/pci/drm/include/linux/atomic.h index 9d12bb2adf2..915d159a00b 100644 --- a/sys/dev/pci/drm/include/linux/atomic.h +++ b/sys/dev/pci/drm/include/linux/atomic.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomic.h,v 1.1 2019/04/14 10:14:53 jsg Exp $ */ +/* $OpenBSD: atomic.h,v 1.2 2019/05/08 22:01:19 jsg Exp $ */ /** * \file drm_atomic.h * Atomic operations used in the DRM which may or may not be provided by the OS. @@ -53,6 +53,7 @@ #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) #define atomic_or(n, p) atomic_setbits_int(p, n) #define atomic_cmpxchg(p, o, n) __sync_val_compare_and_swap(p, o, n) +#define cmpxchg(p, o, n) __sync_val_compare_and_swap(p, o, n) #define atomic_set_release(p, v) atomic_set((p), (v)) static inline int |