mbed library sources. Supersedes mbed-src.
Dependents: SPIne CH_Communicatuin_Test CH_Communicatuin_Test2 MCP_SPIne ... more
Fork of mbed-dev-f303 by
Diff: platform/mbed_toolchain.h
- Revision:
- 169:e3b6fe271b81
- Parent:
- 167:e84263d55307
- Child:
- 170:19eb464bc2be
--- 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.