]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/list.h
printk: when dumping regs, show the stack, not thread_info
[karo-tx-linux.git] / include / linux / list.h
index 5356f4d661a721ba0446b1183e2a834f3bf3b56f..5183138aa932da88c83177b9f8372bd9c3437e13 100644 (file)
@@ -678,6 +678,16 @@ static inline bool hlist_fake(struct hlist_node *h)
        return h->pprev == &h->next;
 }
 
+/*
+ * Check whether the node is the only node of the head without
+ * accessing head:
+ */
+static inline bool
+hlist_is_singular_node(struct hlist_node *n, struct hlist_head *h)
+{
+       return !n->next && n->pprev == &h->first;
+}
+
 /*
  * Move a list from one list head to another. Fixup the pprev
  * reference of the first entry if it exists.