le_singlyLinkedList.h
Go to the documentation of this file.
8 * A singly linked list is a data structure consisting of a group of nodes linked together linearly.44 * requirement for nodes is that it must contain a le_sls_Link_t link member. The link member must98 * simply manages the links in the nodes. The node must first be removed from all lists before its153 * All linked list function calls are re-entrant and thread safe themselves, but if the nodes and/or154 * list object are shared by multiple threads, then explicit steps must be taken to maintain mutual155 * exclusion of access. If you're accessing the same list from multiple threads, you @e must use a176 //--------------------------------------------------------------------------------------------------178 * This link object must be included in each user node. The node's link object is used to add the179 * node to a list. A node may have multiple link objects which would allow the node to be part of185 //--------------------------------------------------------------------------------------------------193 //--------------------------------------------------------------------------------------------------200 //--------------------------------------------------------------------------------------------------208 //--------------------------------------------------------------------------------------------------210 * When a list is created, it must be initialized by assigning this macro to the list before the list213 //--------------------------------------------------------------------------------------------------217 //--------------------------------------------------------------------------------------------------219 * When a link is created, it must be initialized by assigning this macro to the link before it can222 //--------------------------------------------------------------------------------------------------226 //--------------------------------------------------------------------------------------------------230 //--------------------------------------------------------------------------------------------------238 //--------------------------------------------------------------------------------------------------242 //--------------------------------------------------------------------------------------------------250 //--------------------------------------------------------------------------------------------------255 //--------------------------------------------------------------------------------------------------264 //--------------------------------------------------------------------------------------------------266 * Removes the link found after currentLinkPtr. The user must ensure that currentLinkPtr is in the273 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------290 //--------------------------------------------------------------------------------------------------297 //--------------------------------------------------------------------------------------------------305 //--------------------------------------------------------------------------------------------------312 //------------------------------------------------------------------------------------------------------------320 //------------------------------------------------------------------------------------------------------------327 //--------------------------------------------------------------------------------------------------329 * Returns the link next to currentLinkPtr (i.e., the link beside currentLinkPtr that's closer to the338 //--------------------------------------------------------------------------------------------------346 //--------------------------------------------------------------------------------------------------353 //--------------------------------------------------------------------------------------------------355 (358 //--------------------------------------------------------------------------------------------------364 //--------------------------------------------------------------------------------------------------372 //--------------------------------------------------------------------------------------------------380 //--------------------------------------------------------------------------------------------------388 //--------------------------------------------------------------------------------------------------390 (399 //--------------------------------------------------------------------------------------------------407 //--------------------------------------------------------------------------------------------------409 (418 //--------------------------------------------------------------------------------------------------425 //--------------------------------------------------------------------------------------------------432 //--------------------------------------------------------------------------------------------------440 //--------------------------------------------------------------------------------------------------size_t le_sls_NumLinks(const le_sls_List_t *listPtr)struct le_sls_Link * nextPtrNext link pointer.Definition: le_singlyLinkedList.h:188Definition: le_singlyLinkedList.h:186le_sls_Link_t * le_sls_PeekNext(const le_sls_List_t *listPtr, const le_sls_Link_t *currentLinkPtr)le_sls_Link_t * le_sls_PeekTail(const le_sls_List_t *listPtr)le_sls_Link_t * le_sls_Peek(const le_sls_List_t *listPtr)void le_sls_Stack(le_sls_List_t *listPtr, le_sls_Link_t *newLinkPtr)void le_sls_Queue(le_sls_List_t *listPtr, le_sls_Link_t *newLinkPtr)static bool le_sls_IsHead(const le_sls_List_t *listPtr, const le_sls_Link_t *linkPtr)Definition: le_singlyLinkedList.h:390bool le_sls_IsListCorrupted(const le_sls_List_t *listPtr)bool le_sls_IsInList(const le_sls_List_t *listPtr, const le_sls_Link_t *linkPtr)static bool le_sls_IsEmpty(const le_sls_List_t *listPtr)Definition: le_singlyLinkedList.h:355static bool le_sls_IsTail(const le_sls_List_t *listPtr, const le_sls_Link_t *linkPtr)Definition: le_singlyLinkedList.h:409Definition: le_singlyLinkedList.h:201le_sls_Link_t * le_sls_Pop(le_sls_List_t *listPtr)le_sls_Link_t * tailLinkPtrTail link pointer.Definition: le_singlyLinkedList.h:203void le_sls_AddAfter(le_sls_List_t *listPtr, le_sls_Link_t *currentLinkPtr, le_sls_Link_t *newLinkPtr)le_sls_Link_t * le_sls_RemoveAfter(le_sls_List_t *listPtr, le_sls_Link_t *currentLinkPtr)