Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision 63e27efdf2fe6d3fa02bbb5ee1da00df5cc07e9d)
+++ kernel/generic/include/adt/list.h	(revision b76ce3fafabca2ee4bc41e417ad02ab3546c67f2)
@@ -53,10 +53,8 @@
 } list_t;
 
-
 extern bool list_member(const link_t *, const list_t *);
 extern void list_splice(list_t *, link_t *);
 extern unsigned long list_count(const list_t *);
 
-
 /** Declare and initialize statically allocated list.
  *
@@ -65,5 +63,23 @@
  */
 #define LIST_INITIALIZE(name) \
-	list_t name = { \
+	list_t name = LIST_INITIALIZER(name)
+
+/** Initializer for statically allocated list.
+ * 
+ * @code
+ * struct named_list {
+ *     const char *name;
+ *     list_t list;
+ * } var = { 
+ *     .name = "default name", 
+ *     .list = LIST_INITIALIZER(name_list.list) 
+ * };
+ * @endcode
+ *
+ * @param name Name of the new statically allocated list.
+ *
+ */
+#define LIST_INITIALIZER(name) \
+	{ \
 		.head = { \
 			.prev = &(name).head, \
@@ -88,5 +104,5 @@
 
 /** Unlike list_foreach(), allows removing items while traversing a list.
- * 
+ *
  * @code
  * list_t mylist;
@@ -118,7 +134,12 @@
 	    iterator = next_iter, next_iter = iterator->next)
 
-	
 #define assert_link_not_used(link) \
 	assert(!link_used(link))
+
+/** Returns true if the link is definitely part of a list. False if not sure. */
+static inline bool link_in_use(const link_t *link)
+{
+	return link->prev != NULL && link->next != NULL;
+}
 
 /** Initialize doubly-linked circular list link
@@ -247,7 +268,7 @@
  *
  */
-static inline link_t *list_last(list_t *list)
-{
-	return ((list->head.prev == &list->head) ? NULL : list->head.prev);
+static inline link_t *list_last(const list_t *list)
+{
+	return (list->head.prev == &list->head) ? NULL : list->head.prev;
 }
 
@@ -259,5 +280,5 @@
  * @return Next item or NULL if @a link is the last item.
  */
-static inline link_t *list_next(link_t *link, const list_t *list)
+static inline link_t *list_next(const link_t *link, const list_t *list)
 {
 	return (link->next == &list->head) ? NULL : link->next;
@@ -271,5 +292,5 @@
  * @return Previous item or NULL if @a link is the first item.
  */
-static inline link_t *list_prev(link_t *link, const list_t *list)
+static inline link_t *list_prev(const link_t *link, const list_t *list)
 {
 	return (link->prev == &list->head) ? NULL : link->prev;
@@ -354,10 +375,9 @@
  *
  */
-static inline link_t *list_nth(list_t *list, unsigned long n)
+static inline link_t *list_nth(const list_t *list, unsigned long n)
 {
 	unsigned long cnt = 0;
-	link_t *link;
 	
-	link = list_first(list);
+	link_t *link = list_first(list);
 	while (link != NULL) {
 		if (cnt == n)
