kernel/sched: Force inlining of some routines within the scheduler guts

GCC 6.2.0 is making frustratingly poor inlining decisions with some of
these routines, resulting in an awful lot of runtime calls for code
that is only ever expanded once or twice within the file.

Treat with targetted ALWAYS_INLINE's to force the issue.  The
scheduler code is a hot path.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2019-01-28 09:36:36 -08:00 committed by Anas Nashif
commit b2791b0ac8
2 changed files with 9 additions and 9 deletions

View file

@ -215,7 +215,7 @@ static inline bool _is_valid_prio(int prio, void *entry_point)
return true;
}
static inline void _ready_thread(struct k_thread *thread)
static ALWAYS_INLINE void _ready_thread(struct k_thread *thread)
{
if (_is_thread_ready(thread)) {
_add_thread_to_ready_q(thread);