aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2014-04-22 12:54:20 -0400
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-04-28 19:03:22 +0400
commit1af6810622ab0c32336d14c840afd59c81e22a50 (patch)
tree88cc04756cb0622cf2f9d8a1cb662ec1406af522 /include
parent9acedc77eea93597ea1621f530d37d296d6023d0 (diff)
odp_debug.h: Add ODP_STATIC_ASSERT
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/odp_debug.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/odp_debug.h b/include/odp_debug.h
index 4d4f04ea..e35c1acc 100644
--- a/include/odp_debug.h
+++ b/include/odp_debug.h
@@ -43,6 +43,12 @@ extern "C" {
#define ODP_ASSERT(cond, msg) typedef char msg[(cond) ? 1 : -1]
/**
+ * Compile time assertion-macro - fail compilation if cond is false.
+ * @note This macro has zero runtime overhead
+ */
+#define ODP_STATIC_ASSERT(cond, msg) _static_assert(cond, msg)
+
+/**
* Debug printing macro, which prints output when DEBUG flag is set.
*/
#define ODP_DBG(fmt, ...) \