Lines Matching refs:ctx

27 typedef void (rsrc_put_fn)(struct io_ring_ctx *ctx, struct io_rsrc_put *prsrc);
30 struct io_ring_ctx *ctx;
41 struct io_ring_ctx *ctx;
59 void io_rsrc_node_destroy(struct io_ring_ctx *ctx, struct io_rsrc_node *ref_node);
60 struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx);
67 void __io_sqe_buffers_unregister(struct io_ring_ctx *ctx);
68 int io_sqe_buffers_unregister(struct io_ring_ctx *ctx);
69 int io_sqe_buffers_register(struct io_ring_ctx *ctx, void __user *arg,
71 void __io_sqe_files_unregister(struct io_ring_ctx *ctx);
72 int io_sqe_files_unregister(struct io_ring_ctx *ctx);
73 int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
76 int io_register_files_update(struct io_ring_ctx *ctx, void __user *arg,
78 int io_register_rsrc_update(struct io_ring_ctx *ctx, void __user *arg,
80 int io_register_rsrc(struct io_ring_ctx *ctx, void __user *arg,
83 static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
85 lockdep_assert_held(&ctx->uring_lock);
92 struct io_ring_ctx *ctx)
94 io_put_rsrc_node(ctx, req->rsrc_node);
97 static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx,
104 struct io_ring_ctx *ctx)
106 lockdep_assert_held(&ctx->uring_lock);
107 req->rsrc_node = ctx->rsrc_node;
108 io_charge_rsrc_node(ctx, ctx->rsrc_node);
112 struct io_ring_ctx *ctx,
116 io_ring_submit_lock(ctx, issue_flags);
117 __io_req_set_rsrc_node(req, ctx);
118 io_ring_submit_unlock(ctx, issue_flags);
130 static inline int io_rsrc_init(struct io_ring_ctx *ctx)
132 ctx->rsrc_node = io_rsrc_node_alloc(ctx);
133 return ctx->rsrc_node ? 0 : -ENOMEM;