Loading system/osi/include/list.h +4 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ void *list_front(const list_t *list); // be NULL or empty. void *list_back(const list_t *list); // Returns the last node in the list without removing it. |list| may not // be NULL or empty. list_node_t *list_back_node(const list_t *list); // Inserts |data| after |prev_node| in |list|. |data|, |list|, and |prev_node| // may not be NULL. This function does not make a copy of |data| so the pointer // must remain valid at least until the element is removed from the list or the Loading system/osi/src/list.c +7 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,13 @@ void *list_back(const list_t *list) { return list->tail->data; } list_node_t *list_back_node(const list_t *list) { assert(list != NULL); assert(!list_is_empty(list)); return list->tail; } bool list_insert_after(list_t *list, list_node_t *prev_node, void *data) { assert(list != NULL); assert(prev_node != NULL); Loading Loading
system/osi/include/list.h +4 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ void *list_front(const list_t *list); // be NULL or empty. void *list_back(const list_t *list); // Returns the last node in the list without removing it. |list| may not // be NULL or empty. list_node_t *list_back_node(const list_t *list); // Inserts |data| after |prev_node| in |list|. |data|, |list|, and |prev_node| // may not be NULL. This function does not make a copy of |data| so the pointer // must remain valid at least until the element is removed from the list or the Loading
system/osi/src/list.c +7 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,13 @@ void *list_back(const list_t *list) { return list->tail->data; } list_node_t *list_back_node(const list_t *list) { assert(list != NULL); assert(!list_is_empty(list)); return list->tail; } bool list_insert_after(list_t *list, list_node_t *prev_node, void *data) { assert(list != NULL); assert(prev_node != NULL); Loading