From 430b186be7ec1554a29a6d509188eb877d796a7e Mon Sep 17 00:00:00 2001 From: kenneth <459864689@qq.com> Date: Tue, 15 Jun 2021 16:30:32 +0800 Subject: [PATCH] feat: add LOS_ListHeadInsert function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 注释中@see部分提到了函数LOS_ListHeadInsert,但是该函数没有定义,增加该函数的定义。 close #I3TAQA Signed-off-by: kenneth <459864689@qq.com> --- utils/los_list.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/utils/los_list.h b/utils/los_list.h index 9f1bb94e..90fcf4b5 100644 --- a/utils/los_list.h +++ b/utils/los_list.h @@ -151,6 +151,30 @@ LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListTailInsert(LOS_DL_LIST *list, LOS_ListAdd(list->pstPrev, node); } +/** + * @ingroup los_list + * @brief Insert a node to the head of a doubly linked list. + * + * @par Description: + * This API is used to insert a new node to the head of a doubly linked list. + * @attention + * + * + * @param list [IN] Doubly linked list where the new node is inserted. + * @param node [IN] New node to be inserted. + * + * @retval None. + * @par Dependency: + * + * @see LOS_ListAdd | LOS_ListTailInsert + */ +LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListHeadInsert(LOS_DL_LIST *list, LOS_DL_LIST *node) +{ + LOS_ListAdd(list, node); +} + /** * @ingroup los_list * @brief Delete a specified node from a doubly linked list.