group/killchildren: replace syscall(2) to kernel api

syscall(2) cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-10-24 22:23:22 +08:00 committed by Xiang Xiao
parent 2b06142232
commit 50b17fb3fc

View file

@ -32,6 +32,7 @@
#include <sys/types.h>
#include <nuttx/sched.h>
#include <nuttx/signal.h>
#include "sched/sched.h"
#include "group/group.h"
@ -201,9 +202,11 @@ int group_kill_children(FAR struct tcb_s *tcb)
while (1)
{
if (tcb->group->tg_nmembers <= 1)
{
break;
}
usleep(USEC_PER_MSEC);
nxsig_usleep(USEC_PER_MSEC);
# if CONFIG_GROUP_KILL_CHILDREN_TIMEOUT_MS > 0
if (--ret < 0)