Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision b5851913939728ba0da2fbead7b0e5c5c48257cd)
+++ kernel/generic/include/adt/list.h	(revision a159c6aa377c6c5d7c19e1b0e116eb0ae7d48502)
@@ -37,4 +37,5 @@
 #define KERN_LIST_H_
 
+#include <debug.h>
 #include <typedefs.h>
 #include <trace.h>
@@ -73,6 +74,12 @@
 	    _link != &(list).head; _link = _link->next)
 
+#define list_foreach_rev(list, member, itype, iterator) \
+	for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \
+	    for (link_t *_link = (list).head.prev; \
+	    iterator = list_get_instance(_link, itype, member), \
+	    _link != &(list).head; _link = _link->prev)
+
 #define assert_link_not_used(link) \
-	ASSERT(((link)->prev == NULL) && ((link)->next == NULL))
+	ASSERT(!link_used(link))
 
 /** Initialize doubly-linked circular list link
@@ -319,4 +326,18 @@
 }
 
+/** Determine if link is used.
+ *
+ * @param link Link
+ * @return @c true if link is used, @c false if not.
+ */
+static inline bool link_used(link_t *link)
+{
+	if (link->prev == NULL && link->next == NULL)
+		return false;
+
+	ASSERT(link->prev != NULL && link->next != NULL);
+	return true;
+}
+
 extern int list_member(const link_t *, const list_t *);
 extern void list_concat(list_t *, list_t *);
