Skip to content

Commit 845840e

Browse files
committed
[architecture] include noinline in modm_fastcode attribute
1 parent e6efd55 commit 845840e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modm/architecture/utils.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
*/
5555
#define modm_always_inline
5656

57+
/// Specifies that a function should never be inlined
58+
#define modm_noinline
59+
5760
/// Attached to a variable or a function this means that it is meant to be possibly unused.
5861
#define modm_unused
5962

@@ -125,6 +128,7 @@
125128
#define MODM_ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
126129

127130
#define modm_always_inline inline __attribute__((always_inline))
131+
#define modm_noinline __attribute__((noinline))
128132
#define modm_unused __attribute__((unused))
129133
#define modm_aligned(n) __attribute__((aligned(n)))
130134
#define modm_packed __attribute__((packed))
@@ -155,7 +159,7 @@
155159
# define modm_fastdata
156160
# define modm_faststack
157161
#else
158-
# define modm_fastcode modm_section(".fastcode")
162+
# define modm_fastcode modm_section(".fastcode") modm_noinline
159163
# define modm_ramcode modm_fastcode
160164
# define modm_fastdata modm_section(".fastdata")
161165
# define modm_faststack modm_section(".faststack")

0 commit comments

Comments
 (0)