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>
This commit is contained in:
Christoph Muellner 2021-04-06 03:53:52 +02:00 committed by Anup Patel
parent e71a7c10a9
commit d4a94ea471
1 changed files with 1 additions and 0 deletions

View File

@ -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)