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.