Lines Matching defs:tctx
12 #include "tctx.h"
33 struct io_uring_task *tctx = container_of(work, struct io_uring_task,
42 tctx_task_work_run(tctx, UINT_MAX, &count);
43 put_task_struct(tctx->task);
46 static void io_fallback_tw(struct io_uring_task *tctx)
50 * only called when the task itself is freed, ensures the tctx (and
53 get_task_struct(tctx->task);
54 if (!queue_work(system_dfl_wq, &tctx->fallback_work))
55 put_task_struct(tctx->task);
63 void tctx_task_work_run(struct io_uring_task *tctx, unsigned int max_entries,
70 struct llist_node *node = mpscq_pop(&tctx->task_list,
71 &tctx->task_head);
75 if (mpscq_empty(&tctx->task_list))
105 if (mpscq_pop_emptied(&tctx->task_list, tctx->task_head))
117 * The tctx may also be drained by io_tctx_fallback_work(), in which
118 * case current is a kworker that has no tctx refs to drop.
120 if (unlikely(atomic_read(&tctx->in_cancel)) &&
121 current->io_uring == tctx)
124 trace_io_uring_task_work_run(tctx, *count);
129 struct io_uring_task *tctx;
132 tctx = container_of(cb, struct io_uring_task, task_work);
133 tctx_task_work_run(tctx, UINT_MAX, &count);
207 struct io_uring_task *tctx = req->tctx;
211 if (!mpscq_push(&tctx->task_list, &req->io_task_work.node))
223 __set_notify_signal(tctx->task);
227 if (likely(!task_work_add(tctx->task, &tctx->task_work, ctx->notify_method)))
230 io_fallback_tw(tctx);