Improved management of SkipList auxiliary nodes: now aux nodes are allocated from...
[libcds.git] / cds / compiler / gcc / defs.h
index a6028cc6296e77654f66c9cb911bc56dfcd44923..e2c3b7640def756af1430da78358e57145bc94fa 100644 (file)
 #define cds_likely( expr )   __builtin_expect( !!( expr ), 1 )
 #define cds_unlikely( expr ) __builtin_expect( !!( expr ), 0 )
 
+// double-width CAS support
+#if CDS_BUILD_BITS == 64
+#   ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+#       define CDS_DCAS_SUPPORT
+#   endif
+#else
+#   ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
+#       define CDS_DCAS_SUPPORT
+#   endif
+#endif
+
 #include <cds/compiler/gcc/compiler_barriers.h>
 
 #endif // #ifndef CDSLIB_COMPILER_GCC_DEFS_H