From 20960df7401bf23ba575bfb91e1f4934dac72b8b Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Thu, 21 Sep 2023 23:40:52 -0400 Subject: kernel: cdefs: Add __STATIC_ASSERT macro This commit adds a __STATIC_ASSERT which wraps over _Static_assert() to be more consistent with Vega style. Signed-off-by: sigsegv7 --- sys/include/sys/cdefs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys') diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h index 9518dcb..ef6537d 100644 --- a/sys/include/sys/cdefs.h +++ b/sys/include/sys/cdefs.h @@ -99,6 +99,9 @@ /* Suppress `variable set but not used' warnings */ #define __USE(x) ((void)(x)) +/* A cleaner wrapper over _Static_assert() */ +#define __STATIC_ASSERT _Static_assert + /* Computes 2^x i.e 2 to the power of 'x' */ #define __POW2(x) (1ULL << x) -- cgit v1.2.3