aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-09-21 23:40:52 -0400
committersigsegv7 <ian@vegaa.systems>2023-09-21 23:40:52 -0400
commit20960df7401bf23ba575bfb91e1f4934dac72b8b (patch)
tree14266be6f32fa2d5c962442530a4fbd7b1de8639 /sys/include
parent41614e79fb75eb41c4afb8d014a896dfd2421909 (diff)
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 <ian@vegaa.systems>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/cdefs.h3
1 files changed, 3 insertions, 0 deletions
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)