kernel: Fix compilation errors when CONFIG_TIMESLICING=n
Add ifdef guard to the z_reset_timeslice() to fix compilation errors when CONFIG_TIMESLICING is disabled. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
ccffca4a5d
commit
7228a60173
2 changed files with 7 additions and 1 deletions
|
@ -47,7 +47,10 @@ void *_get_next_switch_handle(void *interrupted);
|
|||
struct k_thread *_find_first_thread_to_unpend(_wait_q_t *wait_q,
|
||||
struct k_thread *from);
|
||||
void idle(void *a, void *b, void *c);
|
||||
|
||||
#ifdef CONFIG_TIMESLICING
|
||||
void z_reset_timeslice(void);
|
||||
#endif
|
||||
|
||||
/* find which one is the next thread to run */
|
||||
/* must be called with interrupts locked */
|
||||
|
@ -223,7 +226,8 @@ static inline void _ready_thread(struct k_thread *thread)
|
|||
_add_thread_to_ready_q(thread);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_TICKLESS_KERNEL) && !defined(CONFIG_SMP)
|
||||
#if defined(CONFIG_TICKLESS_KERNEL) && !defined(CONFIG_SMP) && \
|
||||
defined(CONFIG_TIMESLICING)
|
||||
z_reset_timeslice();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue