Lines Matching refs:list
55 struct list struct
57 struct list *next; argument
77 void XMC_LIST_Init(XMC_LIST_t *list) in XMC_LIST_Init() argument
79 *list = NULL; in XMC_LIST_Init()
82 void *XMC_LIST_GetHead(XMC_LIST_t *list) in XMC_LIST_GetHead() argument
84 return *list; in XMC_LIST_GetHead()
87 void *XMC_LIST_GetTail(XMC_LIST_t *list) in XMC_LIST_GetTail() argument
89 struct list *tail; in XMC_LIST_GetTail()
91 if (*list == NULL) in XMC_LIST_GetTail()
97 for (tail = (struct list *)*list; tail->next != NULL; tail = tail->next) in XMC_LIST_GetTail()
106 void XMC_LIST_Add(XMC_LIST_t *list, void *item) in XMC_LIST_Add() argument
108 struct list *tail; in XMC_LIST_Add()
110 ((struct list *)item)->next = NULL; in XMC_LIST_Add()
111 tail = (struct list *)XMC_LIST_GetTail(list); in XMC_LIST_Add()
115 *list = item; in XMC_LIST_Add()
119 tail->next = (struct list *)item; in XMC_LIST_Add()
123 void XMC_LIST_Remove(XMC_LIST_t *list, void *item) in XMC_LIST_Remove() argument
125 struct list *right, *left; in XMC_LIST_Remove()
127 if (*list != NULL) in XMC_LIST_Remove()
130 for(right = (struct list *)*list; right != NULL; right = right->next) in XMC_LIST_Remove()
137 *list = right->next; in XMC_LIST_Remove()
152 void XMC_LIST_Insert(XMC_LIST_t *list, void *prev_item, void *new_item) in XMC_LIST_Insert() argument
156 ((struct list *)new_item)->next = (struct list *)*list; in XMC_LIST_Insert()
157 *list = new_item; in XMC_LIST_Insert()
161 ((struct list *)new_item)->next = ((struct list *)prev_item)->next; in XMC_LIST_Insert()
162 ((struct list *)prev_item)->next = (struct list *)new_item; in XMC_LIST_Insert()