git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: (devfs) a new filesystem for device exposure.
[lunaix-os.git]
/
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 22e0f931b3e22fb9cad6c29963dc6f8b18b958ca..a4797c34d3f889ab9c0e970ed693607ee7953fbe 100644
(file)
--- 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;
}
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.
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.