X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/96cf56ea15a22b8b362aac6c3ab202d2608e9151..96e23fa3c6eabf8a6efebac24b740c5d4a2a1050:/lunaix-os/includes/lunaix/ds/llist.h diff --git a/lunaix-os/includes/lunaix/ds/llist.h b/lunaix-os/includes/lunaix/ds/llist.h index 22e0f93..a4797c3 100644 --- a/lunaix-os/includes/lunaix/ds/llist.h +++ b/lunaix-os/includes/lunaix/ds/llist.h @@ -67,6 +67,12 @@ llist_empty(struct llist_header* elem) return elem->next == elem && elem->prev == elem; } +#define DEFINE_LLIST(name) \ + struct llist_header name = (struct llist_header) \ + { \ + .prev = &name, .next = &name \ + } + /** * list_entry - get the struct for this entry * @ptr: the &struct list_head pointer.