task_setup: set sigprocmask directly to improve performance

signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2022-12-07 19:39:42 +08:00 committed by Xiang Xiao
parent ad33ccfa53
commit 37789e75aa

View File

@ -370,6 +370,7 @@ static int nxthread_setup_scheduler(FAR struct tcb_s *tcb, int priority,
start_t start, CODE void *entry, start_t start, CODE void *entry,
uint8_t ttype) uint8_t ttype)
{ {
FAR struct tcb_s *rtcb = this_task();
int ret; int ret;
/* Assign a unique task ID to the task. */ /* Assign a unique task ID to the task. */
@ -432,7 +433,7 @@ static int nxthread_setup_scheduler(FAR struct tcb_s *tcb, int priority,
* inherit the signal mask of the parent thread. * inherit the signal mask of the parent thread.
*/ */
nxsig_procmask(SIG_SETMASK, NULL, &tcb->sigprocmask); tcb->sigprocmask = rtcb->sigprocmask;
/* Initialize the task state. It does not get a valid state /* Initialize the task state. It does not get a valid state
* until it is activated. * until it is activated.