|
AquilaOS documentation
How it works, and its code
|
Go to the source code of this file.
Data Structures | |
| struct | list_node |
| A link in a list, inside the structure that is listed. More... | |
| struct | list |
| A list: its first and last nodes, and how many there are. More... | |
Macros | |
| #define | list_entry(node, type, member) |
| #define | list_for(n, l) |
Functions | |
| static int | list_empty (struct list *list) |
| Returns whether list has no nodes. | |
| static int | list_linked (struct list_node *node) |
| Returns whether node is on a list (node->list says which). | |
| static void | list_append (struct list *list, struct list_node *node) |
| Adds node at the end of list. | |
| static void | list_prepend (struct list *list, struct list_node *node) |
| Adds node at the head of list, so that list_pop() returns it next. | |
| static void | list_remove (struct list_node *node) |
| Takes node off the list it is on. | |
| static struct list_node * | list_pop (struct list *list) |
| Takes the first node off list and returns it, or NULL if it's empty. | |
| #define list_entry | ( | node, | |
| type, | |||
| member ) |
Definition at line 43 of file list.h.
Referenced by sched_timer_tick(), schedule(), and waitq_wakeup_nopoll().
| #define list_for | ( | n, | |
| l ) |
Definition at line 48 of file list.h.
Referenced by sched_timer_tick().
Adds node at the end of list.
Definition at line 65 of file list.h.
References list::count, list::head, list_node::list, list_node::next, NULL, list_node::prev, and list::tail.
|
inlinestatic |
|
inlinestatic |
Returns whether node is on a list (node->list says which).
Definition at line 59 of file list.h.
References list_node::list, and NULL.
Takes the first node off list and returns it, or NULL if it's empty.
Definition at line 120 of file list.h.
References list::head, and list_remove().
Adds node at the head of list, so that list_pop() returns it next.
Definition at line 81 of file list.h.
References list::count, list::head, list_node::list, list_node::next, NULL, list_node::prev, and list::tail.
|
inlinestatic |
Takes node off the list it is on.
A node on no list is left alone.
Definition at line 97 of file list.h.
References list::count, list::head, list_node::list, list_node::next, NULL, list_node::prev, and list::tail.
Referenced by list_pop().