Skip to content

Commit

Permalink
kconfig.h: add daemons' stack size setting
Browse files Browse the repository at this point in the history
  • Loading branch information
shengwen-tw committed Nov 24, 2023
1 parent 4a6f112 commit 559035c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions kconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
/* The minimum stack size recommended for creating task and thread */
#define STACK_SIZE_MIN 1024 /* Bytes */

/* Daemons */
#define IDLE_STACK_SIZE 2048
#define SOFTIRQD_STACK_SIZE 2048
#define FILESYSD_STACK_SIZE 2048

/* Task */
#define TASK_MAX 64 /* Max number of tasks in the system */

Expand Down
6 changes: 3 additions & 3 deletions kernel/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2778,9 +2778,9 @@ void sched_start(void)
}

/* Create kernel threads for basic services */
kthread_create(init, 0, 2048);
kthread_create(softirqd, KTHREAD_PRI_MAX, 2048);
kthread_create(filesysd, KTHREAD_PRI_MAX - 1, 2048);
kthread_create(init, 0, IDLE_STACK_SIZE);
kthread_create(softirqd, KTHREAD_PRI_MAX, SOFTIRQD_STACK_SIZE);
kthread_create(filesysd, KTHREAD_PRI_MAX - 1, FILESYSD_STACK_SIZE);

/* Dequeue thread 0 (Idle) to execute */
running_thread = &threads[0];
Expand Down

0 comments on commit 559035c

Please sign in to comment.