#define CDS_DATA_ALIGNMENT(n) __attribute__ ((aligned (n)))
+// likely/unlikely
+
+#define cds_likely( expr ) __builtin_expect( !!( expr ), 1 )
+#define cds_unlikely( expr ) __builtin_expect( !!( expr ), 0 )
+
#include <cds/compiler/gcc/compiler_barriers.h>
#endif // #ifndef CDSLIB_COMPILER_GCC_DEFS_H
# define CDS_EXPORT_API
#endif
+#ifndef cds_likely
+# define cds_likely( expr ) expr
+# define cds_unlikely( expr ) expr
+#endif
+
// Features
#include <cds/compiler/feature_tsan.h>
# define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason )))
#endif
+// likely/unlikely
+
+#define cds_likely( expr ) __builtin_expect( !!( expr ), 1 )
+#define cds_unlikely( expr ) __builtin_expect( !!( expr ), 0 )
+
#include <cds/compiler/gcc/compiler_barriers.h>
#endif // #ifndef CDSLIB_COMPILER_GCC_DEFS_H