feat: add LOS_ListHeadInsert function
注释中@see部分提到了函数LOS_ListHeadInsert,但是该函数没有定义,增加该函数的定义。 close #I3TAQA Signed-off-by: kenneth <459864689@qq.com>
This commit is contained in:
parent
749bd8a481
commit
430b186be7
|
@ -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
|
||||
* <ul>
|
||||
* <li>The parameters passed in should be ensured to be legal pointers.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param list [IN] Doubly linked list where the new node is inserted.
|
||||
* @param node [IN] New node to be inserted.
|
||||
*
|
||||
* @retval None.
|
||||
* @par Dependency:
|
||||
* <ul><li>los_list.h: the header file that contains the API declaration.</li></ul>
|
||||
* @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.
|
||||
|
|
Loading…
Reference in New Issue