Lines Matching +full:light +full:- +full:weight
1 /* SPDX-License-Identifier: GPL-2.0-only */
6 * Light-weight single-linked queue built from llist
30 * lwq_init - initialise a lwq
35 spin_lock_init(&q->lock); in lwq_init()
36 q->ready = NULL; in lwq_init()
37 init_llist_head(&q->new); in lwq_init()
41 * lwq_empty - test if lwq contains any entry
51 return smp_load_acquire(&q->ready) == NULL && llist_empty(&q->new); in lwq_empty()
56 * lwq_dequeue - dequeue first (oldest) entry from lwq
72 * lwq_for_each_safe - iterate over detached queue allowing deletion
85 _t2 = ((*_t1)->next), \
88 (_n) ? (_t1 = &(_n)->_member.node.next, 0) \
92 * lwq_enqueue - add a new item to the end of the queue
93 * @n - the lwq_node embedded in the item to be added
94 * @q - the lwq to append to.
103 return llist_add(&n->node, &q->new) && in lwq_enqueue()
104 smp_load_acquire(&q->ready) == NULL; in lwq_enqueue()
108 * lwq_enqueue_batch - add a list of new items to the end of the queue
109 * @n - the lwq_node embedded in the first item to be added
110 * @q - the lwq to append to.
121 return llist_add_batch(llist_reverse_order(n), e, &q->new) && in lwq_enqueue_batch()
122 smp_load_acquire(&q->ready) == NULL; in lwq_enqueue_batch()