summaryrefslogtreecommitdiff
path: root/xf86atomic.h
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-26 10:46:57 +0200
committerPeter Seiderer <ps.report@gmx.net>2019-12-06 21:57:12 +0000
commit8c511950395ce496028bbc5ba30d9b9632690db6 (patch)
treece56fb25a87e9bd03e05c5205c1787a22739b394 /xf86atomic.h
parent8c1185d22cb5ea09dea063bd4a0a4f8b64487919 (diff)
xf86atomic: require CAS support in libatomic_ops
Since AO_compare_and_swap_full() is used by libdrm, AO_REQUIRE_CAS must be defined before including <atomic_ops.h> so that we are sure that CAS support will be provided. This is necessary to make sure that the AO_compare_and_swap_full() function will be provided on all architectures, including the ones that don't have built-in CAS support such as SPARCv8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Seiderer <ps.report@gmx.net> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Diffstat (limited to 'xf86atomic.h')
-rw-r--r--xf86atomic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xf86atomic.h b/xf86atomic.h
index 2d733bd5..efa47a77 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -54,6 +54,7 @@ typedef struct {
#endif
#if HAVE_LIB_ATOMIC_OPS
+#define AO_REQUIRE_CAS
#include <atomic_ops.h>
#define HAS_ATOMIC_OPS 1