mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
group/child_status: Dynamically expand group child_status
Change-Id: I4033e93b6adceb01eebe1c2a12ffe8737042b1a6 Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -156,8 +156,7 @@ void task_initialize(void)
|
|||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* On success, a non-NULL pointer to a child status structure. NULL is
|
* On success, a non-NULL pointer to a child status structure. NULL is
|
||||||
* returned if there are no remaining, pre-allocated child status
|
* returned when memory allocation fails.
|
||||||
* structures.
|
|
||||||
*
|
*
|
||||||
* Assumptions:
|
* Assumptions:
|
||||||
* Called during task creation in a safe context. No special precautions
|
* 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;
|
g_child_pool.freelist = ret->flink;
|
||||||
ret->flink = NULL;
|
ret->flink = NULL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = kmm_zalloc(sizeof(*ret));
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user