From c6b4f5c4ca8c4583d4c7b55cf0e394673348b04e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 31 Oct 2019 18:11:28 -0600 Subject: [PATCH] include/nuttx/compiler.h: Changes that go along with commit 0002258f17b38752d21056680f7e658a81bc8fd4 --- include/nuttx/compiler.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index c583b39749..e95f76af21 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -118,7 +118,11 @@ # define farcall_function __attribute__ ((long_call)) -/* The packed attribute informs GCC that the stucture elements are packed, +/* Data alignment */ + +# define aligned_data(n) __attribute__ ((aligned(n))) + +/* The packed attribute informs GCC that the structure elements are packed, * ignoring other alignment rules. */ @@ -352,6 +356,7 @@ */ # define noreturn_function +# define aligned_data(n) # define begin_packed_struct # define end_packed_struct @@ -495,6 +500,7 @@ */ # define noreturn_function +# define aligned_data(n) # define begin_packed_struct # define end_packed_struct # define naked_function @@ -599,6 +605,7 @@ # define weak_const_function # define noreturn_function # define farcall_function +# define aligned_data(n) # define begin_packed_struct __packed # define end_packed_struct # define reentrant_function @@ -648,6 +655,7 @@ # define restrict # define noreturn_function # define farcall_function +# define aligned_data(n) # define begin_packed_struct # define end_packed_struct # define reentrant_function