From a77e7566a8bb0135b52737e62fd1d6503b7b057a Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 24 Aug 2021 21:36:29 +0900 Subject: [PATCH] kernel: Remove unused timeout_q from z_kernel This commit removes the `timeout_q` from the `struct z_kernel` since it is no longer used. Note that the new kernel timeout implementation introduced in the commit 987c0e5fc1fa665ce629796c97529f219380e0a7 uses `timeout_list` global variable in place of it. Signed-off-by: Stephanos Ioannidis --- include/kernel_structs.h | 7 ------- kernel/init.c | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/include/kernel_structs.h b/include/kernel_structs.h index ee4a8c4b240..84140d7809b 100644 --- a/include/kernel_structs.h +++ b/include/kernel_structs.h @@ -135,11 +135,6 @@ typedef struct _cpu _cpu_t; struct z_kernel { struct _cpu cpus[CONFIG_MP_NUM_CPUS]; -#ifdef CONFIG_SYS_CLOCK_EXISTS - /* queue of timeouts */ - sys_dlist_t timeout_q; -#endif - #ifdef CONFIG_PM int32_t idle; /* Number of ticks for kernel idling */ #endif @@ -189,8 +184,6 @@ bool z_smp_cpu_mobile(void); #define _current _kernel.cpus[0].current #endif -#define _timeout_q _kernel.timeout_q - /* kernel wait queue record */ #ifdef CONFIG_WAITQ_SCALABLE diff --git a/kernel/init.c b/kernel/init.c index 90abce0adae..c83e17580f8 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -65,14 +65,6 @@ K_KERNEL_PINNED_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_NUM_CPUS, CONFIG_ISR_STACK_SIZE); -#ifdef CONFIG_SYS_CLOCK_EXISTS - #define initialize_timeouts() do { \ - sys_dlist_init(&_timeout_q); \ - } while (false) -#else - #define initialize_timeouts() do { } while ((0)) -#endif - extern void idle(void *unused1, void *unused2, void *unused3); @@ -312,8 +304,6 @@ static char *prepare_multithreading(void) K_KERNEL_STACK_SIZEOF(z_interrupt_stacks[i])); } - initialize_timeouts(); - return stack_ptr; }