kernel: system_work_q: make k_work_queue_config cfg as static const

Make `k_work_queue_config cfg` as `static const` to enable
compile-time instantiation instead of runtime allocation.
This modification saves substantial flash memory but has system-wide
effects that should be considered.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2025-03-23 15:51:46 +07:00 committed by Benjamin Cabé
commit cc0684351a

View file

@ -21,7 +21,7 @@ struct k_work_q k_sys_work_q;
static int k_sys_work_q_init(void)
{
struct k_work_queue_config cfg = {
static const struct k_work_queue_config cfg = {
.name = "sysworkq",
.no_yield = IS_ENABLED(CONFIG_SYSTEM_WORKQUEUE_NO_YIELD),
.essential = true,