sarmfsw: SMFSW Toolbox (for ARM & compatible with Arduino platform) 3.7
SMFSW collection of miscellaneous functions & macros (for ARM & compatible with Arduino platform)
|
ARM common compilers attributes. More...
Macros | |
#define | __WEAK __attribute__((weak)) |
Weak attribute. | |
#define | __IRQ __attribute__((interrupt_handler)) |
Interrupt attribute. | |
#define | ATTR__(...) __attribute__((__VA_ARGS__)) |
Macro to define one or multiple attribute(s) ... for a declaration. | |
#define | ALIGN__(n) __attribute__((align(n))) |
Align attribute padded to n . | |
#define | COLD__ __attribute__((cold)) |
Cold attribute. | |
#define | DEPRECATED__ __attribute__((deprecated)) |
Deprecated attribute. | |
#define | HOT__ __attribute__((hot)) |
Hot attribute. | |
#define | INLINE__ __attribute__((always_inline)) |
Always inline attribute. | |
#define | NONNULL__ __attribute__((nonnull)) |
Non null attribute (all pointers will be checked) | |
#define | NONNULLX__(...) __attribute__((nonnull(__VA_ARGS__))) |
Non null attribute for ... pointers indexes. | |
#define | NORETURN__ __attribute__((__noreturn__)) |
No return attribute. | |
#define | PACK__ __attribute__((packed)) |
Packed attribute. | |
#define | PURE__ __attribute__((pure)) |
Pure attribute. | |
#define | SECTION__(s) __attribute__((section(#s))) |
Section attribute to place declaration into section s . | |
#define | USED__ __attribute__((used)) |
Used attribute ensures declaration won't be removed by garbage collector. | |
#define | NONNULL_INLINE__ ATTR__(nonnull, always_inline) |
Non null and Always inline attributes. | |
#define | SSO(o) scalar_storage_order(#o) |
Alias for Scalar Storage Order. | |
#define | BIG_ENDIAN__ ATTR__(packed, SSO(big-endian)) |
Force structure in Big-Endian (use wisely or not at all) | |
#define | LITTLE_ENDIAN__ ATTR__(packed, SSO(little-endian)) |
Force structure in Little-Endian (use wisely or not at all) | |
#define | __NOOPT__ |
No Optimizations attribute. | |
#define | __TYPEOF __typeof__ |
typeof keyword alias ( | |
#define | __ASM __asm__ |
asm keyword alias ( | |
#define | __STATIC static |
static alias when functions visibility may be required (__INLINE remaining static) | |
#define | __INLINE static inline |
inline attribute alias | |
#define | __INLINE __attribute__((always_inline)) static inline |
inline attribute alias | |
#define | __STATIC_INLINE __attribute__((always_inline)) static inline |
static inline attribute alias when __NOOPT__ defined | |
ARM common compilers attributes.
Set attributes following compiler
Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef
(misra-c2012-20.5)
Rule-20.10 - Advisory: #
and ##
preprocessor operators (misra-c2012-20.10)
Header scope legitimate use derogation authorized for:
Rule-21.1 - Required: #define
and #undef
on reserved identifiers (misra-c2012-21.1)
Justification: #define
are generic reserved identifiers for attributes.
#define __ASM __asm__ |
asm
keyword alias (
#define __INLINE static inline |
inline
attribute alias
inline
attribute alias when __NOOPT__
defined
#define __INLINE __attribute__((always_inline)) static inline |
inline
attribute alias
inline
attribute alias when __NOOPT__
defined
#define __IRQ __attribute__((interrupt_handler)) |
Interrupt attribute.
#define __NOOPT__ |
No Optimizations attribute.
#define __STATIC static |
static
alias when functions visibility may be required (__INLINE remaining static)
#define __STATIC_INLINE __attribute__((always_inline)) static inline |
static
inline
attribute alias when __NOOPT__
defined
#define __TYPEOF __typeof__ |
typeof
keyword alias (
#define __WEAK __attribute__((weak)) |
Weak attribute.
#define ALIGN__ | ( | n | ) | __attribute__((align(n))) |
Align attribute padded to n
.
#define ATTR__ | ( | ... | ) | __attribute__((__VA_ARGS__)) |
Macro to define one or multiple attribute(s) ... for a declaration.
Force structure in Big-Endian (use wisely or not at all)
#define COLD__ __attribute__((cold)) |
Cold attribute.
#define DEPRECATED__ __attribute__((deprecated)) |
Deprecated attribute.
#define HOT__ __attribute__((hot)) |
Hot attribute.
#define INLINE__ __attribute__((always_inline)) |
Always inline
attribute.
Force structure in Little-Endian (use wisely or not at all)
#define NONNULL__ __attribute__((nonnull)) |
Non null
attribute (all pointers will be checked)
#define NONNULL_INLINE__ ATTR__(nonnull, always_inline) |
Non null
and Always inline
attributes.
#define NONNULLX__ | ( | ... | ) | __attribute__((nonnull(__VA_ARGS__))) |
Non null
attribute for ... pointers indexes.
#define NORETURN__ __attribute__((__noreturn__)) |
No return
attribute.
#define PACK__ __attribute__((packed)) |
Packed attribute.
#define PURE__ __attribute__((pure)) |
Pure attribute.
#define SECTION__ | ( | s | ) | __attribute__((section(#s))) |
Section attribute to place declaration into section s
.
#define SSO | ( | o | ) | scalar_storage_order(#o) |
Alias for Scalar Storage Order.
#define USED__ __attribute__((used)) |
Used attribute ensures declaration won't be removed by garbage collector.