1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

core/thread: Allow for inline thread_yield_higher

Similar to irq.h, this allows for inline the often trivial
thread_yield_higher function
This commit is contained in:
Koen Zandberg 2021-01-18 17:07:09 +01:00
parent f0ce992d4a
commit 9d5f87bf67
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -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.