From e9f17947b7a9c04c9e79438f9c6d99bae975ee80 Mon Sep 17 00:00:00 2001 From: ligd Date: Tue, 25 Jan 2022 12:23:37 +0800 Subject: [PATCH] task: don't set default signal in kernal thread Signed-off-by: ligd --- sched/task/task_start.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sched/task/task_start.c b/sched/task/task_start.c index 7eb1c9a907..11af95dcd2 100644 --- a/sched/task/task_start.c +++ b/sched/task/task_start.c @@ -82,9 +82,12 @@ void nxtask_start(void) TCB_FLAG_TTYPE_PTHREAD); #ifdef CONFIG_SIG_DEFAULT - /* Set up default signal actions */ + if ((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_KERNEL) + { + /* Set up default signal actions for NON-kernel thread */ - nxsig_default_initialize(&tcb->cmn); + nxsig_default_initialize(&tcb->cmn); + } #endif /* Execute the start hook if one has been registered */