Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay
Fork of mbed-dev by
Diff: platform/mbed_toolchain.h
- Revision:
- 169:e3b6fe271b81
- Parent:
- 167:e84263d55307
- Child:
- 170:19eb464bc2be
diff -r 9672193075cf -r e3b6fe271b81 platform/mbed_toolchain.h
--- a/platform/mbed_toolchain.h Thu Jul 06 15:42:05 2017 +0100
+++ b/platform/mbed_toolchain.h Wed Jul 19 17:31:21 2017 +0100
@@ -137,6 +137,27 @@
#endif
#endif
+/** MBED_NOINLINE
+ * Declare a function that must not be inlined.
+ *
+ * @code
+ * #include "mbed_toolchain.h"
+ *
+ * MBED_NOINLINE void foo() {
+ *
+ * }
+ * @endcode
+ */
+#ifndef MBED_NOINLINE
+#if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
+#define MBED_NOINLINE __attribute__((noinline))
+#elif defined(__ICCARM__)
+#define MBED_NOINLINE _Pragma("inline=never")
+#else
+#define MBED_NOINLINE
+#endif
+#endif
+
/** MBED_FORCEINLINE
* Declare a function that must always be inlined. Failure to inline
* such a function will result in an error.
