]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: guard likly macros with #ifdef
authorKefu Chai <kchai@redhat.com>
Sun, 22 Jul 2018 03:01:10 +0000 (11:01 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 22 Jul 2018 05:08:31 +0000 (13:08 +0800)
DPDK also defines them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/likely.h

index c095dd39d3bd0cc9f1757e6116313dfb5cf8a420..abaf2d2e2d52cc7faa2ce9af42d7c03bf749f3fe 100644 (file)
 /*
  * Likely / Unlikely macros
  */
+#ifndef likely
 #define likely(x)       __builtin_expect((x),1)
+#endif
+#ifndef unlikely
 #define unlikely(x)     __builtin_expect((x),0)
-
+#endif
+#ifndef expect
 #define expect(x, hint) __builtin_expect((x),(hint))
+#endif
 
 #endif