Add SEGMENT macro for specifying a segment in which the object will be allocated
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 30s
Builds / ExectOS (i686) (push) Successful in 29s

This commit is contained in:
Rafal Kupiec 2023-12-29 20:46:25 +01:00
parent 493dbd0a5a
commit f00b1b620f
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -40,9 +40,10 @@
#define MAXLONG 0x7FFFFFFF
#define MAXULONG 0xFFFFFFFF
/* Preprocessor macros for defining a structure alignment and packing */
/* Preprocessor macros for defining a structure alignment, packing and segment */
#define ALIGN(x) __attribute__((aligned(x)))
#define PACK __attribute__((packed))
#define SEGMENT(segment) __attribute__((section(segment)))
/* Macro for calculating size of an array */
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x))