Add __aligned(x) and __packed macros to GCC toolchain
The names "__aligned(x)" and "__packed" are more generic than ALIGN_STRUCT(x) and PACK_STRUCT respectively and are to be used in their stead. NOTE: ALIGN_STRUCT(x) and PACK_STRUCT are now considered obsolete. Change-Id: Ic5e859092643dde53bb8fa1117c6d877c2c4296f Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
5c892eeccc
commit
4bb47b625c
1 changed files with 8 additions and 0 deletions
|
@ -99,9 +99,17 @@ __extension__ ({ \
|
||||||
|
|
||||||
#define _GENERIC_SECTION(segment) __attribute__((section(#segment)))
|
#define _GENERIC_SECTION(segment) __attribute__((section(#segment)))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do not use either PACK_STRUCT or ALIGN_STRUCT(x).
|
||||||
|
* Use __packed or __aligned(x) instead.
|
||||||
|
*/
|
||||||
|
|
||||||
#define PACK_STRUCT __attribute__((__packed__))
|
#define PACK_STRUCT __attribute__((__packed__))
|
||||||
#define ALIGN_STRUCT(x) __attribute__((aligned(x)))
|
#define ALIGN_STRUCT(x) __attribute__((aligned(x)))
|
||||||
|
|
||||||
|
#define __packed __attribute__((__packed__))
|
||||||
|
#define __aligned(x) __attribute__((aligned(x)))
|
||||||
|
|
||||||
#define ARG_UNUSED(x) (void)(x)
|
#define ARG_UNUSED(x) (void)(x)
|
||||||
|
|
||||||
#define likely(x) __builtin_expect((long)!!(x), 1L)
|
#define likely(x) __builtin_expect((long)!!(x), 1L)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue