]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - lib/llist.c
llist: Make some llist functions inline
[karo-tx-linux.git] / lib / llist.c
index da445724fa1ffe221421b06c540dd17b9e0df2b7..3e3fa9139c41daa5f91d60fd2d491eff6a697ab2 100644 (file)
 
 #include <asm/system.h>
 
-/**
- * llist_add - add a new entry
- * @new:       new entry to be added
- * @head:      the head for your lock-less list
- */
-void llist_add(struct llist_node *new, struct llist_head *head)
-{
-       struct llist_node *entry, *old_entry;
-
-#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
-       BUG_ON(in_nmi());
-#endif
-
-       entry = head->first;
-       do {
-               old_entry = entry;
-               new->next = entry;
-               cpu_relax();
-       } while ((entry = cmpxchg(&head->first, old_entry, new)) != old_entry);
-}
-EXPORT_SYMBOL_GPL(llist_add);
-
 /**
  * llist_add_batch - add several linked entries in batch
  * @new_first: first entry in batch to be added
@@ -109,21 +87,3 @@ struct llist_node *llist_del_first(struct llist_head *head)
        return entry;
 }
 EXPORT_SYMBOL_GPL(llist_del_first);
-
-/**
- * llist_del_all - delete all entries from lock-less list
- * @head:      the head of lock-less list to delete all entries
- *
- * If list is empty, return NULL, otherwise, delete all entries and
- * return the pointer to the first entry.  The order of entries
- * deleted is from the newest to the oldest added one.
- */
-struct llist_node *llist_del_all(struct llist_head *head)
-{
-#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
-       BUG_ON(in_nmi());
-#endif
-
-       return xchg(&head->first, NULL);
-}
-EXPORT_SYMBOL_GPL(llist_del_all);