Inserts the new node at the head of the list.
Definition at line 49 of file list.c. References rpl_list::count, rpl_list::first, and rpl_list::last. Referenced by config_end(), and config_start(). { assert(list_p != NULL); assert(node_p != NULL); assert(data_ptr != NULL); node_p->data_ptr = data_ptr; node_p->prev = NULL; if (list_p->count == 0) { list_p->last = node_p; } else { node_p->next = list_p->first; list_p->first->prev = node_p; } list_p->first = node_p; list_p->count++; return list_p->first; }
|