Lines Matching +full:lock +full:- +full:less
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Lock-less NULL terminated single linked list
6 * architectures that don't have NMI-safe cmpxchg implementation, the
19 * llist_add_batch - add several linked entries in batch
22 * @head: the head for your lock-less list
29 struct llist_node *first = READ_ONCE(head->first); in llist_add_batch()
32 new_last->next = first; in llist_add_batch()
33 } while (!try_cmpxchg(&head->first, &first, new_first)); in llist_add_batch()
40 * llist_del_first - delete the first entry of lock-less list
41 * @head: the head for your lock-less list
47 * multiple llist_add users without lock. Because otherwise
49 * llist_add) sequence in another user may change @head->first->next,
50 * but keep @head->first. If multiple consumers are needed, please
51 * use llist_del_all or use lock between consumers.
57 entry = smp_load_acquire(&head->first); in llist_del_first()
61 next = READ_ONCE(entry->next); in llist_del_first()
62 } while (!try_cmpxchg(&head->first, &entry, next)); in llist_del_first()
69 * llist_del_first_this - delete given entry of lock-less list if it is first
70 * @head: the head for your lock-less list
85 entry = smp_load_acquire(&head->first); in llist_del_first_this()
89 next = READ_ONCE(entry->next); in llist_del_first_this()
90 } while (!try_cmpxchg(&head->first, &entry, next)); in llist_del_first_this()
97 * llist_reverse_order - reverse order of a llist chain
109 head = head->next; in llist_reverse_order()
110 tmp->next = new_head; in llist_reverse_order()