Skip to content

Commit

Permalink
scheduler: make EDF stack size configurable
Browse files Browse the repository at this point in the history
Instead of hard-coding EDF scheduler work queue thread stack size,
add a Kconfig option for it.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Jan 10, 2025
1 parent 7d11802 commit decc67e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion zephyr/edf_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <zephyr/sys_clock.h>

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
Expand Down

0 comments on commit decc67e

Please sign in to comment.