mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
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:
@@ -32,6 +32,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <nuttx/sched.h>
|
#include <nuttx/sched.h>
|
||||||
|
#include <nuttx/signal.h>
|
||||||
|
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
@@ -201,9 +202,11 @@ int group_kill_children(FAR struct tcb_s *tcb)
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (tcb->group->tg_nmembers <= 1)
|
if (tcb->group->tg_nmembers <= 1)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
usleep(USEC_PER_MSEC);
|
nxsig_usleep(USEC_PER_MSEC);
|
||||||
|
|
||||||
# if CONFIG_GROUP_KILL_CHILDREN_TIMEOUT_MS > 0
|
# if CONFIG_GROUP_KILL_CHILDREN_TIMEOUT_MS > 0
|
||||||
if (--ret < 0)
|
if (--ret < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user