summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Muellner <cmuellner@linux.com>2021-04-06 04:53:52 +0300
committerAnup Patel <anup@brainfault.org>2021-04-09 16:07:06 +0300
commitd4a94ea471451f0a24e02e2e7ebf869bb4f7dbf4 (patch)
treef58500cda64030d60c7382d76131d42dbdaa02cb
parente71a7c10a934cdfa4c88f0f7b0c8ecb33c9bcff1 (diff)
downloadopensbi-d4a94ea471451f0a24e02e2e7ebf869bb4f7dbf4.tar.xz
include: types: Add __aligned(x) to define the minimum alignement
The __aligned(x) macro is a common wrapper around compiler's aligned attribute, which allow to define the minimum alignement of a data type. Let's add this macro. Signed-off-by: Christoph Muellner <cmuellner@linux.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
-rw-r--r--include/sbi/sbi_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h
index 0952d5c..38e3565 100644
--- a/include/sbi/sbi_types.h
+++ b/include/sbi/sbi_types.h
@@ -63,6 +63,7 @@ typedef unsigned long physical_size_t;
#define __packed __attribute__((packed))
#define __noreturn __attribute__((noreturn))
+#define __aligned(x) __attribute__((aligned(x)))
#define likely(x) __builtin_expect((x), 1)
#define unlikely(x) __builtin_expect((x), 0)