#include <stddef.h>
#include <types.h>
Go to the source code of this file.
|
#define | list_head_init(name) {&name, &name} |
|
#define | list_entry(node, type, member) ((type *) ((u8 *) (node) - offsetof(type, member))) |
|
#define | list_first_entry(head, type, member) list_entry(list_front(head), type, member) |
|
#define | list_last_entry(head, type, member) list_entry(list_back(head), type, member) |
|
#define | list_for_each(head, node) for (node = (head)->next; node != (head); node = node->next) |
|
#define | list_for_each_entry(head, member, entry) |
|
◆ list_entry
#define list_entry |
( |
|
node, |
|
|
|
type, |
|
|
|
member |
|
) |
| ((type *) ((u8 *) (node) - offsetof(type, member))) |
◆ list_first_entry
#define list_first_entry |
( |
|
head, |
|
|
|
type, |
|
|
|
member |
|
) |
| list_entry(list_front(head), type, member) |
◆ list_for_each
#define list_for_each |
( |
|
head, |
|
|
|
node |
|
) |
| for (node = (head)->next; node != (head); node = node->next) |
◆ list_for_each_entry
#define list_for_each_entry |
( |
|
head, |
|
|
|
member, |
|
|
|
entry |
|
) |
| |
Value:
&entry->member != (head); \
entry =
list_entry(entry->member.next, typeof(*entry), member))
#define list_first_entry(head, type, member)
Definition: list.h:35
#define list_entry(node, type, member)
Definition: list.h:33
◆ list_head_init
#define list_head_init |
( |
|
name | ) |
{&name, &name} |
◆ list_last_entry
#define list_last_entry |
( |
|
head, |
|
|
|
type, |
|
|
|
member |
|
) |
| list_entry(list_back(head), type, member) |
◆ list_node_t