• Home
  • Raw
  • Download

Lines Matching +full:reverse +full:- +full:data

1 // SPDX-License-Identifier: GPL-2.0
24 if (cl->fn && !(flags & CLOSURE_DESTRUCTOR)) { in closure_put_after_sub()
25 atomic_set(&cl->remaining, in closure_put_after_sub()
29 struct closure *parent = cl->parent; in closure_put_after_sub()
30 closure_fn *destructor = cl->fn; in closure_put_after_sub()
46 closure_put_after_sub(cl, atomic_sub_return(v, &cl->remaining)); in closure_sub()
50 * closure_put - decrement a closure's refcount
54 closure_put_after_sub(cl, atomic_dec_return(&cl->remaining)); in closure_put()
58 * closure_wake_up - wake up all closures on a wait list, without memory barrier
64 struct llist_node *reverse = NULL; in __closure_wake_up() local
66 list = llist_del_all(&wait_list->list); in __closure_wake_up()
68 /* We first reverse the list to preserve FIFO ordering and fairness */ in __closure_wake_up()
69 reverse = llist_reverse_order(list); in __closure_wake_up()
72 llist_for_each_entry_safe(cl, t, reverse, list) { in __closure_wake_up()
79 * closure_wait - add a closure to a waitlist
87 if (atomic_read(&cl->remaining) & CLOSURE_WAITING) in closure_wait()
91 atomic_add(CLOSURE_WAITING + 1, &cl->remaining); in closure_wait()
92 llist_add(&cl->list, &waitlist->list); in closure_wait()
104 struct closure_syncer *s = cl->s; in closure_sync_fn()
108 p = READ_ONCE(s->task); in closure_sync_fn()
109 s->done = 1; in closure_sync_fn()
118 cl->s = &s; in __closure_sync()
140 BUG_ON(cl->magic == CLOSURE_MAGIC_ALIVE); in closure_debug_create()
141 cl->magic = CLOSURE_MAGIC_ALIVE; in closure_debug_create()
144 list_add(&cl->all, &closure_list); in closure_debug_create()
152 BUG_ON(cl->magic != CLOSURE_MAGIC_ALIVE); in closure_debug_destroy()
153 cl->magic = CLOSURE_MAGIC_DEAD; in closure_debug_destroy()
156 list_del(&cl->all); in closure_debug_destroy()
162 static int debug_show(struct seq_file *f, void *data) in debug_show() argument
169 int r = atomic_read(&cl->remaining); in debug_show()
171 seq_printf(f, "%p: %pS -> %pS p %p r %i ", in debug_show()
172 cl, (void *) cl->ip, cl->fn, cl->parent, in debug_show()
177 work_data_bits(&cl->work)) ? "Q" : "", in debug_show()
182 (void *) cl->waiting_on); in debug_show()