X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/0067bc210e621ccda286092d081a7890d65e1c18..86a9cfeadbbe180abf6c8bd8c64c86957fdacfeb:/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 effee95..dd2a192 100644 --- a/lunaix-os/includes/lunaix/ds/llist.h +++ b/lunaix-os/includes/lunaix/ds/llist.h @@ -58,6 +58,10 @@ llist_delete(struct llist_header* elem) { elem->next = elem; } +static inline int llist_empty(struct llist_header* elem) { + return elem->next == elem; +} + /** * list_entry - get the struct for this entry * @ptr: the &struct list_head pointer.