Lines Matching full:work

154 	struct unwind_work *work;  in process_unwind_deferred()  local
179 list_for_each_entry_srcu(work, &callbacks, list, in process_unwind_deferred()
181 if (test_bit(work->bit, &bits)) { in process_unwind_deferred()
182 work->func(work, &trace, cookie); in process_unwind_deferred()
184 info->cache->unwind_completed |= BIT(work->bit); in process_unwind_deferred()
203 task_work_cancel(task, &info->work); in unwind_deferred_task_exit()
208 * @work: Unwind descriptor requesting the trace
211 * Schedule a user space unwind to be done in task work before exiting the
220 * It's valid to call this function multiple times for the same @work within
231 int unwind_deferred_request(struct unwind_work *work, u64 *cookie) in unwind_deferred_request() argument
253 bit = READ_ONCE(work->bit); in unwind_deferred_request()
271 * This work's bit hasn't been set yet. Now set it with the PENDING in unwind_deferred_request()
273 * work's bit or PENDING was already set, then this is already queued in unwind_deferred_request()
280 * If the work's bit was set, whatever set it had better in unwind_deferred_request()
287 /* The work has been claimed, now schedule it. */ in unwind_deferred_request()
288 ret = task_work_add(current, &info->work, TWA_RESUME); in unwind_deferred_request()
296 void unwind_deferred_cancel(struct unwind_work *work) in unwind_deferred_cancel() argument
301 if (!work) in unwind_deferred_cancel()
304 bit = work->bit; in unwind_deferred_cancel()
306 /* No work should be using a reserved bit */ in unwind_deferred_cancel()
311 list_del_rcu(&work->list); in unwind_deferred_cancel()
314 work->bit = -1; in unwind_deferred_cancel()
329 int unwind_deferred_init(struct unwind_work *work, unwind_callback_t func) in unwind_deferred_init() argument
331 memset(work, 0, sizeof(*work)); in unwind_deferred_init()
339 work->bit = ffz(unwind_mask); in unwind_deferred_init()
340 __set_bit(work->bit, &unwind_mask); in unwind_deferred_init()
342 list_add_rcu(&work->list, &callbacks); in unwind_deferred_init()
343 work->func = func; in unwind_deferred_init()
352 init_task_work(&info->work, unwind_deferred_task_work); in unwind_task_init()
361 task_work_cancel(task, &info->work); in unwind_task_free()