llist-return-whether-list-is-empty-before-adding-in-llist_add-fix
[pandora-kernel.git] / include / linux / llist.h
index 837fb4a..801b44b 100644 (file)
@@ -148,7 +148,7 @@ static inline struct llist_node *llist_next(struct llist_node *node)
  * @new:       new entry to be added
  * @head:      the head for your lock-less list
  *
- * Return whether list is empty before adding.
+ * Returns true if the list was empty prior to adding this entry.
  */
 static inline bool llist_add(struct llist_node *new, struct llist_head *head)
 {
@@ -178,4 +178,10 @@ static inline struct llist_node *llist_del_all(struct llist_head *head)
 {
        return xchg(&head->first, NULL);
 }
+
+extern bool llist_add_batch(struct llist_node *new_first,
+                           struct llist_node *new_last,
+                           struct llist_head *head);
+extern struct llist_node *llist_del_first(struct llist_head *head);
+
 #endif /* LLIST_H */