Lines Matching full:list
8 * 1. Redistributions of source code must retain the above copyright notice, this list of
11 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
33 * @defgroup los_list Doubly linked list
50 * Structure of a node in a doubly linked list.
59 * @brief Initialize a doubly linked list.
62 * This API is used to initialize a doubly linked list.
68 * @param list [IN] Node in a doubly linked list.
75 LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListInit(LOS_DL_LIST *list) in LOS_ListInit() argument
77 list->pstNext = list; in LOS_ListInit()
78 list->pstPrev = list; in LOS_ListInit()
94 * @param object [IN] Node in the doubly linked list.
105 * @brief Insert a new node to a doubly linked list.
108 * This API is used to insert a new node to a doubly linked list.
114 * @param list [IN] Doubly linked list where the new node is inserted.
122 LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListAdd(LOS_DL_LIST *list, LOS_DL_LIST *node) in LOS_ListAdd() argument
124 node->pstNext = list->pstNext; in LOS_ListAdd()
125 node->pstPrev = list; in LOS_ListAdd()
126 list->pstNext->pstPrev = node; in LOS_ListAdd()
127 list->pstNext = node; in LOS_ListAdd()
132 * @brief Insert a node to the tail of a doubly linked list.
135 * This API is used to insert a new node to the tail of a doubly linked list.
141 * @param list [IN] Doubly linked list where the new node is inserted.
149 LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListTailInsert(LOS_DL_LIST *list, LOS_DL_LIST *node) in LOS_ListTailInsert() argument
151 LOS_ListAdd(list->pstPrev, node); in LOS_ListTailInsert()
156 * @brief Insert a node to the head of a doubly linked list.
159 * This API is used to insert a new node to the head of a doubly linked list.
165 * @param list [IN] Doubly linked list where the new node is inserted.
173 LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListHeadInsert(LOS_DL_LIST *list, LOS_DL_LIST *node) in LOS_ListHeadInsert() argument
175 LOS_ListAdd(list, node); in LOS_ListHeadInsert()
180 * @brief Delete a specified node from a doubly linked list.
184 * <li>This API is used to delete a specified node from a doubly linked list.</li>
208 * @brief Identify whether a specified doubly linked list is empty.
212 * <li>This API is used to return whether a doubly linked list is empty.</li>
219 * @param list [IN] Doubly linked node.
221 * @retval TRUE The doubly linked list is empty.
222 * @retval FALSE The doubly linked list is not empty.
234 * @brief Obtain the pointer to a doubly linked list in a structure.
237 * This API is used to obtain the pointer to a doubly linked list in a structure.
244 * @param member [IN] Member name of the doubly linked list in the structure.
246 * @retval Pointer to the doubly linked list in the structure.
255 * @brief Obtain the pointer to a structure that contains a doubly linked list.
258 * This API is used to obtain the pointer to a structure that contains a doubly linked list.
269 * @param member [IN] Member name of the doubly linked list in the structure.
271 * @retval Pointer to the structure that contains the doubly linked list.
281 * @brief Iterate over a doubly linked list of given type.
284 * This API is used to iterate over a doubly linked list of given type.
290 …* @param item [IN] Pointer to the structure that contains the doubly linked list that is…
291 * @param list [IN] Pointer to the doubly linked list to be traversed.
293 * @param member [IN] Member name of the doubly linked list in the structure.
300 #define LOS_DL_LIST_FOR_EACH_ENTRY(item, list, type, member) \ argument
301 for ((item) = LOS_DL_LIST_ENTRY((list)->pstNext, type, member); \
302 &(item)->member != (list); \
307 * @brief iterate over a doubly linked list safe against removal of list entry.
310 * This API is used to iterate over a doubly linked list safe against removal of list entry.
316 …* @param item [IN] Pointer to the structure that contains the doubly linked list that is…
318 * @param list [IN] Pointer to the doubly linked list to be traversed.
320 * @param member [IN] Member name of the doubly linked list in the structure.
327 #define LOS_DL_LIST_FOR_EACH_ENTRY_SAFE(item, next, list, type, member) \ argument
328 for ((item) = LOS_DL_LIST_ENTRY((list)->pstNext, type, member), \
330 &((item)->member) != (list); \
335 * @brief Delete initialize a doubly linked list.
338 * This API is used to delete initialize a doubly linked list.
344 * @param list [IN] Doubly linked list.
351 LITE_OS_SEC_ALW_INLINE STATIC_INLINE VOID LOS_ListDelInit(LOS_DL_LIST *list) in LOS_ListDelInit() argument
353 list->pstNext->pstPrev = list->pstPrev; in LOS_ListDelInit()
354 list->pstPrev->pstNext = list->pstNext; in LOS_ListDelInit()
355 LOS_ListInit(list); in LOS_ListDelInit()
360 * @brief iterate over a doubly linked list.
363 * This API is used to iterate over a doubly linked list.
369 …* @param item [IN] Pointer to the structure that contains the doubly linked list that is…
370 * @param list [IN] Pointer to the doubly linked list to be traversed.
377 #define LOS_DL_LIST_FOR_EACH(item, list) \ argument
378 for ((item) = (list)->pstNext; (item) != (list); (item) = (item)->pstNext)
382 * @brief Iterate over a doubly linked list safe against removal of list entry.
385 * This API is used to iterate over a doubly linked list safe against removal of list entry.
391 …* @param item [IN] Pointer to the structure that contains the doubly linked list that is…
393 * @param list [IN] Pointer to the doubly linked list to be traversed.
400 #define LOS_DL_LIST_FOR_EACH_SAFE(item, next, list) \ argument
401 for ((item) = (list)->pstNext, (next) = (item)->pstNext; (item) != (list); \
406 * @brief Initialize a double linked list.
409 * This API is used to initialize a double linked list.
415 * @param list [IN] Pointer to the doubly linked list to be traversed.
422 #define LOS_DL_LIST_HEAD(list) \ argument
423 LOS_DL_LIST list = { &(list), &(list) }