aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/clib.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-04-25 10:55:53 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-04-25 20:48:53 +0000
commitb14c49d2275f6348640572b7b481dad43f3a00d0 (patch)
tree4eb2dc3a39ba0119e670e78d6450871701b375e6 /src/vppinfra/clib.h
parente984831e079342865215d5511b535c8900095722 (diff)
vppinfra: add COMPILE_TIME_CONST() macro
Type: improvement Change-Id: I10d7489f57bc60eb92049962b4e6ea84974f17b8 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/clib.h')
-rw-r--r--src/vppinfra/clib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h
index 05af8fe7168..4629a7defb8 100644
--- a/src/vppinfra/clib.h
+++ b/src/vppinfra/clib.h
@@ -120,6 +120,7 @@
/* Hints to compiler about hot/cold code. */
#define PREDICT_FALSE(x) __builtin_expect((x),0)
#define PREDICT_TRUE(x) __builtin_expect((x),1)
+#define COMPILE_TIME_CONST(x) __builtin_constant_p (x)
/*
* Compiler barrier