llist.h
stddef.h
resource_internal.h
llist.h
stddef.h
llist.h
resource_internal.h
llist_head
LLIST_HEAD_INIT
name
{ &(name), &(name) }
LLIST_HEAD
name
struct llist_head name = LLIST_HEAD_INIT(name)
llist_entry
ptr
type
member
((type *)( (char *)(ptr) - offsetof(type, member) ))

Get the struct for this entry.

ptr

the &struct llist_head pointer

type

the type of the struct this is embedded in

member

the name of the llist_struct within the struct

The struct for this entry

llist_for_each_entry
type
pos
head
member
for (pos = llist_entry((head)->next, type, member); \ &pos->member != (head); \ pos = llist_entry(pos->member.next, type, member))

Iterate over llist of given type.

type

the type of the loop counter

pos

the type * to use as a loop counter

head

the head for your llist

member

the name of the llist_struct within the struct

void static void llist_add (struct llist_head *_new, struct llist_head *head) llist_add struct llist_head * _new struct llist_head * head

Add a new entry after the specified head.

new

new entry to be added

head

llist head to add it after

llist_head::next
llist_head::prev
void static void llist_del (struct llist_head *entry) llist_del struct llist_head * entry

Deletes entry from llist.

entry

the element to delete from the llist

llist_head::next
llist_head::prev

Simple double-linked list.