From decc67e2f11fff0086961564837d6dc23f347358 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 10 Jan 2025 15:56:26 +0100 Subject: [PATCH] scheduler: make EDF stack size configurable Instead of hard-coding EDF scheduler work queue thread stack size, add a Kconfig option for it. Signed-off-by: Guennadi Liakhovetski --- zephyr/Kconfig | 7 +++++++ zephyr/edf_schedule.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 803d668857f3..cb33046bd42a 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -89,4 +89,11 @@ config VIRTUAL_HEAP help Enabling this option will use the virtual memory heap allocator to allocate buffers. It is based on a set of buffers whose size is predetermined. + +config STACK_SIZE_EDF + int "EDF scheduler stack size" + default 8192 + help + EDF scheduler work-queue thread stack size. Keep a power of 2. + endif diff --git a/zephyr/edf_schedule.c b/zephyr/edf_schedule.c index ca196842cb1a..6588af5ea05e 100644 --- a/zephyr/edf_schedule.c +++ b/zephyr/edf_schedule.c @@ -14,7 +14,7 @@ #include static struct k_work_q edf_workq; -static K_THREAD_STACK_DEFINE(edf_workq_stack, 8192); +static K_THREAD_STACK_DEFINE(edf_workq_stack, CONFIG_STACK_SIZE_EDF); /* * since only IPC is using the EDF scheduler - we schedule the work in the