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:
parent
25fe4745e6
commit
cc0684351a
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ struct k_work_q k_sys_work_q;
|
||||||
|
|
||||||
static int k_sys_work_q_init(void)
|
static int k_sys_work_q_init(void)
|
||||||
{
|
{
|
||||||
struct k_work_queue_config cfg = {
|
static const struct k_work_queue_config cfg = {
|
||||||
.name = "sysworkq",
|
.name = "sysworkq",
|
||||||
.no_yield = IS_ENABLED(CONFIG_SYSTEM_WORKQUEUE_NO_YIELD),
|
.no_yield = IS_ENABLED(CONFIG_SYSTEM_WORKQUEUE_NO_YIELD),
|
||||||
.essential = true,
|
.essential = true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue