You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/16 03:15:07 UTC
[incubator-nuttx] branch master updated: group/child_status:
Dynamically expand group child_status
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/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 9e4352a group/child_status: Dynamically expand group child_status
9e4352a is described below
commit 9e4352ad6450b90504142476b7bcbad2e9dc0c9a
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Thu Jul 15 17:00:13 2021 +0800
group/child_status: Dynamically expand group child_status
Change-Id: I4033e93b6adceb01eebe1c2a12ffe8737042b1a6
Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
sched/group/group_childstatus.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sched/group/group_childstatus.c b/sched/group/group_childstatus.c
index 4b9cb08..dfc3a0b 100644
--- a/sched/group/group_childstatus.c
+++ b/sched/group/group_childstatus.c
@@ -156,8 +156,7 @@ void task_initialize(void)
*
* Returned Value:
* On success, a non-NULL pointer to a child status structure. NULL is
- * returned if there are no remaining, pre-allocated child status
- * structures.
+ * returned when memory allocation fails.
*
* Assumptions:
* Called during task creation in a safe context. No special precautions
@@ -177,6 +176,10 @@ FAR struct child_status_s *group_alloc_child(void)
g_child_pool.freelist = ret->flink;
ret->flink = NULL;
}
+ else
+ {
+ ret = kmm_zalloc(sizeof(*ret));
+ }
return ret;
}