sim: set loop thread priority to configurable

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2023-03-30 11:13:14 +08:00 committed by Xiang Xiao
parent 4e70d59c3b
commit ebaea6bd9f
2 changed files with 8 additions and 1 deletions

View File

@ -140,6 +140,13 @@ config SIM_WALLTIME_SIGNAL
endchoice
config SIM_LOOPTASK_PRIORITY
int "looptask priority"
default SCHED_HPWORKPRIORITY if SCHED_HPWORK
default 255 if !SCHED_HPWORK
---help---
Looptask priority
config SIM_LOOPTASK_INTERVAL
int "looptask interval in us"
default 10000

View File

@ -310,7 +310,7 @@ void up_initialize(void)
sim_usbhost_initialize();
#endif
kthread_create("loop_task", SCHED_PRIORITY_MAX,
kthread_create("loop_task", CONFIG_SIM_LOOPTASK_PRIORITY,
CONFIG_DEFAULT_TASK_STACKSIZE,
sim_loop_task, NULL);
}