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:
parent
1e87d50d34
commit
512676cb06
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue