sched: Don't duplicate caller file handler when creating kernel thread

kernel thread should have only the starndard file i/o just like idle thread

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-01-31 02:10:54 +08:00 committed by Petro Karashchenko
parent 1e87d50d34
commit 512676cb06
1 changed files with 9 additions and 1 deletions

View File

@ -105,7 +105,15 @@ int nxtask_init(FAR struct task_tcb_s *tcb, const char *name, int priority,
/* Associate file descriptors with the new task */ /* Associate file descriptors with the new task */
ret = group_setuptaskfiles(tcb); if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
ret = group_setupidlefiles(tcb);
}
else
{
ret = group_setuptaskfiles(tcb);
}
if (ret < 0) if (ret < 0)
{ {
goto errout_with_group; goto errout_with_group;