• Home
  • Raw
  • Download

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

1 // SPDX-License-Identifier: GPL-2.0
30 if (cl->fn && !(flags & CLOSURE_DESTRUCTOR)) { in closure_put_after_sub()
31 atomic_set(&cl->remaining, in closure_put_after_sub()
35 struct closure *parent = cl->parent; in closure_put_after_sub()
36 closure_fn *destructor = cl->fn; in closure_put_after_sub()
52 closure_put_after_sub(cl, atomic_sub_return(v, &cl->remaining)); in closure_sub()
56 * closure_put - decrement a closure's refcount
60 closure_put_after_sub(cl, atomic_dec_return(&cl->remaining)); in closure_put()
64 * closure_wake_up - wake up all closures on a wait list, without memory barrier
70 struct llist_node *reverse = NULL; in __closure_wake_up() local
72 list = llist_del_all(&wait_list->list); in __closure_wake_up()
74 /* We first reverse the list to preserve FIFO ordering and fairness */ in __closure_wake_up()
75 reverse = llist_reverse_order(list); in __closure_wake_up()
78 llist_for_each_entry_safe(cl, t, reverse, list) { in __closure_wake_up()
85 * closure_wait - add a closure to a waitlist
93 if (atomic_read(&cl->remaining) & CLOSURE_WAITING) in closure_wait()
97 atomic_add(CLOSURE_WAITING + 1, &cl->remaining); in closure_wait()
98 llist_add(&cl->list, &waitlist->list); in closure_wait()
110 struct closure_syncer *s = cl->s; in closure_sync_fn()
114 p = READ_ONCE(s->task); in closure_sync_fn()
115 s->done = 1; in closure_sync_fn()
124 cl->s = &s; in __closure_sync()
146 BUG_ON(cl->magic == CLOSURE_MAGIC_ALIVE); in closure_debug_create()
147 cl->magic = CLOSURE_MAGIC_ALIVE; in closure_debug_create()
150 list_add(&cl->all, &closure_list); in closure_debug_create()
158 BUG_ON(cl->magic != CLOSURE_MAGIC_ALIVE); in closure_debug_destroy()
159 cl->magic = CLOSURE_MAGIC_DEAD; in closure_debug_destroy()
162 list_del(&cl->all); in closure_debug_destroy()
168 static int debug_show(struct seq_file *f, void *data) in debug_show() argument
175 int r = atomic_read(&cl->remaining); in debug_show()
177 seq_printf(f, "%p: %pS -> %pS p %p r %i ", in debug_show()
178 cl, (void *) cl->ip, cl->fn, cl->parent, in debug_show()
183 work_data_bits(&cl->work)) ? "Q" : "", in debug_show()
188 (void *) cl->waiting_on); in debug_show()