sched/tcb: fix 12320 regression
This patch attempts to fix regressions reported for pull# 12320. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
parent
e01fb50541
commit
c8f18767de
3 changed files with 11 additions and 5 deletions
|
|
@ -529,9 +529,11 @@ int nx_bringup(void)
|
|||
|
||||
#if !defined(CONFIG_DISABLE_ENVIRON) && (defined(CONFIG_PATH_INITIAL) || \
|
||||
defined(CONFIG_LDPATH_INITIAL))
|
||||
/* We an save a few bytes by discarding the IDLE thread's environment. */
|
||||
/* We would save a few bytes by discarding the IDLE thread's environment.
|
||||
* But when kthreads share the same group, this is no longer proper, so
|
||||
* we can't do clearenv() now.
|
||||
*/
|
||||
|
||||
clearenv();
|
||||
#endif
|
||||
|
||||
sched_trace_end();
|
||||
|
|
|
|||
|
|
@ -170,9 +170,9 @@ int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t ttype)
|
|||
|
||||
nxtask_joindestroy(tcb);
|
||||
|
||||
/* Kernel thread and group still reference by pthread */
|
||||
/* Task still referenced by pthread */
|
||||
|
||||
if (ttype != TCB_FLAG_TTYPE_PTHREAD)
|
||||
if (ttype == TCB_FLAG_TTYPE_TASK)
|
||||
{
|
||||
ttcb = (FAR struct task_tcb_s *)tcb;
|
||||
if (!sq_empty(&ttcb->group.tg_members)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,11 @@ void _exit(int status)
|
|||
* exit through a different mechanism.
|
||||
*/
|
||||
|
||||
group_kill_children(tcb);
|
||||
if ((tcb->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
group_kill_children(tcb);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Perform common task termination logic. This will get called again later
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue