diff --git a/core/include/thread.h b/core/include/thread.h index 16d4e6a36f..5b1ba1fdc4 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -129,10 +129,24 @@ #include "thread_flags.h" #endif +#include "thread_arch.h" + #ifdef __cplusplus extern "C" { #endif +/** + * @brief Macro definition to inline some of the platform specific + * implementations + * + * Should be enabled when advantageous by CPU's in their thread_arch.h header + */ +#ifdef THREAD_API_INLINED +#define THREAD_MAYBE_INLINE static inline __attribute__((always_inline)) +#else +#define THREAD_MAYBE_INLINE +#endif /* THREAD_API_INLINED */ + #if defined(DEVELHELP) && !defined(CONFIG_THREAD_NAMES) /** * @brief This global macro enable storage of thread names to help developers. @@ -431,7 +445,7 @@ void thread_yield(void); * * @see thread_yield() */ -void thread_yield_higher(void); +THREAD_MAYBE_INLINE void thread_yield_higher(void); /** * @brief Puts the current thread into zombie state.