sched: group: Fix group_signal() for SMP

Summary:
- This commit fixes the signest_test issue with lc823450-xgevk

Impact:
- SMP with CONFIG_SCHED_CHILD_STATUS=y

Testing:
- Tested with ostest with lc82345-xgevk:rndis
- NOTE: need to revert the commit 65274d5fdf

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2021-04-23 09:19:05 +09:00 committed by Xiang Xiao
parent 5c562c1068
commit 0ec5563a60

View File

@ -214,7 +214,11 @@ int group_signal(FAR struct task_group_s *group, FAR siginfo_t *siginfo)
* nothing if were were called from an interrupt handler).
*/
#ifdef CONFIG_SMP
irqstate_t flags = enter_critical_section();
#else
sched_lock();
#endif
/* Now visit each member of the group and perform signal handling checks. */
@ -253,7 +257,11 @@ int group_signal(FAR struct task_group_s *group, FAR siginfo_t *siginfo)
}
errout:
#ifdef CONFIG_SMP
leave_critical_section(flags);
#else
sched_unlock();
#endif
return ret;
#else