kernel: sched: Remove possible deadcode

Put z_priq_dumb_add inside a ifdef guard to avoid deadcode.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2023-01-06 12:51:16 -08:00 committed by Anas Nashif
parent a6b4af4a93
commit 2757e711e1

View file

@ -178,6 +178,7 @@ static ALWAYS_INLINE struct k_thread *_priq_dumb_mask_best(sys_dlist_t *pq)
} }
#endif #endif
#if defined(CONFIG_SCHED_DUMB) || defined(CONFIG_WAITQ_DUMB)
static ALWAYS_INLINE void z_priq_dumb_add(sys_dlist_t *pq, static ALWAYS_INLINE void z_priq_dumb_add(sys_dlist_t *pq,
struct k_thread *thread) struct k_thread *thread)
{ {
@ -195,6 +196,7 @@ static ALWAYS_INLINE void z_priq_dumb_add(sys_dlist_t *pq,
sys_dlist_append(pq, &thread->base.qnode_dlist); sys_dlist_append(pq, &thread->base.qnode_dlist);
} }
#endif
static ALWAYS_INLINE void *thread_runq(struct k_thread *thread) static ALWAYS_INLINE void *thread_runq(struct k_thread *thread)
{ {