![]() |
![]() |
|
SysLink API Reference
2.21.03.11
|
Creates a doubly linked list. It works as utils for other modules.

Go to the source code of this file.
Data Structures | |
| struct | List_Elem_tag |
| Structure defining object for the list element. More... | |
| struct | List_Object_tag |
| Structure defining object for the list. More... | |
| struct | List_Params_tag |
| Structure defining params for the list. More... | |
Macros | |
| #define | List_traverse(x, y) |
| Traverse the full list till the last element. | |
Typedefs | |
| typedef struct List_Elem_tag | List_Elem |
| Structure defining object for the list element. | |
| typedef struct List_Object_tag | List_Object |
| Structure defining object for the list. | |
| typedef List_Object * | List_Handle |
| Defines List handle type. | |
| typedef struct List_Params_tag | List_Params |
| Structure defining params for the list. | |
Functions | |
| Void | List_Params_init (List_Params *params) |
| Initialize this config-params structure with supplier-specified defaults before instance creation. | |
| List_Handle | List_create (List_Params *params, Error_Block *eb) |
| Function to create a list object. | |
| Void | List_delete (List_Handle *handlePtr) |
| Function to delete a list object. | |
| Void | List_construct (List_Object *obj, List_Params *params) |
| Function to construct a list object. This function is used when memory for the list object is not to be allocated by the List API. | |
| Void | List_destruct (List_Object *obj) |
| Function to destruct a list object. | |
| Void | List_elemClear (List_Elem *elem) |
| Function to clear element contents. | |
| Bool | List_empty (List_Handle handle) |
| Function to check if list is empty. | |
| Ptr | List_get (List_Handle handle) |
| Function to get first element of List. | |
| Void | List_put (List_Handle handle, List_Elem *elem) |
| Function to insert element at the end of List. | |
| Ptr | List_next (List_Handle handle, List_Elem *elem) |
| Function to traverse to the next element in the list (non atomic) | |
| Ptr | List_prev (List_Handle handle, List_Elem *elem) |
| Function to traverse to the previous element in the list (non atomic) | |
| Void | List_insert (List_Handle handle, List_Elem *newElem, List_Elem *curElem) |
| Function to insert element before the existing element in the list. | |
| Void | List_remove (List_Handle handle, List_Elem *elem) |
| Function to removes element from the List. | |
| Void | List_putHead (List_Handle handle, List_Elem *elem) |
| Function to put the element before head. | |
| Ptr | List_dequeue (List_Handle handle) |
| Get element from front of List (non-atomic) | |
| Void | List_enqueue (List_Handle handle, List_Elem *elem) |
| Put element at end of List (non-atomic) | |
| Void | List_enqueueHead (List_Handle handle, List_Elem *elem) |
| Put element at head of List (non-atomic) | |
| #define List_traverse | ( | x, | |
| y | |||
| ) |
Traverse the full list till the last element.
| typedef struct List_Elem_tag List_Elem |
Structure defining object for the list element.
| typedef struct List_Object_tag List_Object |
Structure defining object for the list.
| typedef List_Object* List_Handle |
Defines List handle type.
| typedef struct List_Params_tag List_Params |
Structure defining params for the list.
| Void List_Params_init | ( | List_Params * | params | ) |
Initialize this config-params structure with supplier-specified defaults before instance creation.
| params | Instance config-params structure. |
| List_Handle List_create | ( | List_Params * | params, |
| Error_Block * | eb | ||
| ) |
Function to create a list object.
| params | Pointer to list creation parameters. If NULL is passed, default parameters are used. |
| eb | Unused |
| List-handle | Handle to the list object |
| Void List_delete | ( | List_Handle * | handlePtr | ) |
Function to delete a list object.
| handlePtr | Pointer to the list handle |
| Void List_construct | ( | List_Object * | obj, |
| List_Params * | params | ||
| ) |
Function to construct a list object. This function is used when memory for the list object is not to be allocated by the List API.
| obj | Pointer to the list object to be constructed |
| params | Pointer to list construction parameters. If NULL is passed, default parameters are used. |
| Void List_destruct | ( | List_Object * | obj | ) |
Function to destruct a list object.
| obj | Pointer to the list object to be destructed |
Function to clear element contents.
| elem | Element to be cleared |
| Bool List_empty | ( | List_Handle | handle | ) |
Function to check if list is empty.
| handle | Pointer to the list |
| TRUE | List is empty |
| FALSE | List is not empty |
| Ptr List_get | ( | List_Handle | handle | ) |
Function to get first element of List.
| handle | Pointer to the list |
| NULL | Operation failed |
| Valid-pointer | Pointer to first element |
| Void List_put | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Function to insert element at the end of List.
| handle | Pointer to the list |
| elem | Element to be inserted |
| Ptr List_next | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Function to traverse to the next element in the list (non atomic)
| handle | Pointer to the list |
| elem | Pointer to the current element |
| NULL | Operation failed |
| Valid-pointer | Pointer to next element |
| Ptr List_prev | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Function to traverse to the previous element in the list (non atomic)
| handle | Pointer to the list |
| elem | Pointer to the current element |
| NULL | Operation failed |
| Valid-pointer | Pointer to previous element |
| Void List_insert | ( | List_Handle | handle, |
| List_Elem * | newElem, | ||
| List_Elem * | curElem | ||
| ) |
Function to insert element before the existing element in the list.
| handle | Pointer to the list |
| newElem | Element to be inserted |
| curElem | Existing element before which new one is to be inserted |
| Void List_remove | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Function to removes element from the List.
| handle | Pointer to the list |
| elem | Element to be removed |
| Void List_putHead | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Function to put the element before head.
| handle | Pointer to the list |
| elem | Element to be added at the head |
| Ptr List_dequeue | ( | List_Handle | handle | ) |
Get element from front of List (non-atomic)
| handle | Pointer to the list |
| NULL | Operation failed |
| Valid-pointer | Pointer to removed element |
| Void List_enqueue | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Put element at end of List (non-atomic)
| handle | Pointer to the list |
| elem | Element to be put |
| Void List_enqueueHead | ( | List_Handle | handle, |
| List_Elem * | elem | ||
| ) |
Put element at head of List (non-atomic)
| handle | Pointer to the list |
| elem | Element to be added |