xiaoxiang781216 commented on code in PR #21898:
URL: https://github.com/apache/nuttx/pull/21898#discussion_r4602550276
##########
sched/task/task_init.c:
##########
@@ -43,6 +43,37 @@
#include "task/task.h"
#include "tls/tls.h"
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: nxtask_drop_child
+ *
+ * Description:
+ * Remove the child entry that nxtask_setup_scheduler() added to the
+ * group of the caller, for a new task that never ran.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_SCHED_HAVE_PARENT
+static void nxtask_drop_child(FAR struct tcb_s *tcb)
+{
+ FAR struct task_group_s *pgrp = this_task()->group;
+
+# ifdef CONFIG_SCHED_CHILD_STATUS
+ group_free_child(group_remove_child(pgrp, tcb->pid));
+# else
+ if (pgrp->tg_nchildren > 0)
Review Comment:
need lock?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]