This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 50b17fb3fcf326287da9bd22f3370153da532a51
Author: chao an <[email protected]>
AuthorDate: Tue Oct 24 22:23:22 2023 +0800

    group/killchildren: replace syscall(2) to kernel api
    
    syscall(2) cannot be called from kernel space
    
    Signed-off-by: chao an <[email protected]>
---
 sched/group/group_killchildren.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sched/group/group_killchildren.c b/sched/group/group_killchildren.c
index ec80c22e51..06c300e91e 100644
--- a/sched/group/group_killchildren.c
+++ b/sched/group/group_killchildren.c
@@ -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)

Reply via email to