Lines Matching refs:tctx
12 #include "tctx.h"
33 struct io_uring_task *tctx = container_of(work, struct io_uring_task,
38 clear_bit(0, &tctx->tw_pending);
46 tctx_task_work_run(tctx, UINT_MAX, &count);
47 put_task_struct(tctx->task);
50 static void io_fallback_tw(struct io_uring_task *tctx)
54 * only called when the task itself is freed, ensures the tctx (and
57 get_task_struct(tctx->task);
58 if (!queue_work(system_unbound_wq, &tctx->fallback_work))
59 put_task_struct(tctx->task);
67 void tctx_task_work_run(struct io_uring_task *tctx, unsigned int max_entries,
74 struct llist_node *node = mpscq_pop(&tctx->task_list,
75 &tctx->task_head);
79 if (mpscq_empty(&tctx->task_list))
114 * The tctx may also be drained by io_tctx_fallback_work(), in which
115 * case current is a kworker that has no tctx refs to drop.
117 if (unlikely(atomic_read(&tctx->in_cancel)) &&
118 current->io_uring == tctx)
121 trace_io_uring_task_work_run(tctx, *count);
126 struct io_uring_task *tctx;
129 tctx = container_of(cb, struct io_uring_task, task_work);
130 clear_bit(0, &tctx->tw_pending);
132 tctx_task_work_run(tctx, UINT_MAX, &count);
206 struct io_uring_task *tctx = req->tctx;
210 if (!mpscq_push(&tctx->task_list, &req->io_task_work.node))
222 __set_notify_signal(tctx->task);
227 if (test_and_set_bit(0, &tctx->tw_pending))
230 if (likely(!task_work_add(tctx->task, &tctx->task_work, ctx->notify_method)))
233 io_fallback_tw(tctx);