Lines Matching refs:item
12 #define GET_ITEM(list, item) ({ BytePointer<void> pointer((uint8*)item \
14 #define GET_LINK(list, item) ({ BytePointer<list_link> pointer((uint8*)item \
117 /** Gets the successor for the current item. If the passed
118 * item is NULL, it returns the first entry in the list,
124 list_get_next_item(struct list *list, void *item)
128 if (item == NULL)
131 link = get_next_link(list, GET_LINK(list, item));
136 /** Gets the predecessor for the current item. If the passed
137 * item is NULL, it returns the last entry in the list,
143 list_get_prev_item(struct list *list, void *item)
147 if (item == NULL)
150 link = get_prev_link(list, GET_LINK(list, item));
162 /** Adds an item to the end of the list.
163 * Similar to list_add_link_to_tail() but works on the item, not the link.
167 list_add_item(struct list *list, void *item)
169 list_add_link_to_tail(list, GET_LINK(list, item));
173 /** Removes an item from the list.
174 * Similar to list_remove_link() but works on the item, not the link.
178 list_remove_item(struct list *list, void *item)
180 list_remove_link(GET_LINK(list, item));
184 /** Inserts an item before another item in the list.
185 * If you pass NULL as \a before item, the item is added at the end of
190 list_insert_item_before(struct list *list, void *before, void *item)
196 list_add_item(list, item);
201 link = GET_LINK(list, item);
211 /** Removes the first item in the list and returns it.
228 /** Removes the last item in the list and returns it.