mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-15 09:35:19 +00:00

This works just like pipe2(2), except it also supports fixed file descriptors. Used in a similar fashion as for other fd instantiating opcodes (like accept, socket, open, etc), where sqe->file_slot is set appropriately if two direct descriptors are desired rather than a set of normal file descriptors. sqe->addr must be set to a pointer to an array of 2 integers, which is where the fixed/normal file descriptors are copied to. sqe->pipe_flags contains flags, same as what is allowed for pipe2(2). Future expansion of per-op private flags can go in sqe->ioprio, like we do for other opcodes that take both a "syscall" flag set and an io_uring opcode specific flag set. Signed-off-by: Jens Axboe <axboe@kernel.dk>
21 lines
888 B
C
21 lines
888 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
int __io_close_fixed(struct io_ring_ctx *ctx, unsigned int issue_flags,
|
|
unsigned int offset);
|
|
|
|
int io_openat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
int io_openat(struct io_kiocb *req, unsigned int issue_flags);
|
|
void io_open_cleanup(struct io_kiocb *req);
|
|
|
|
int io_openat2_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
int io_openat2(struct io_kiocb *req, unsigned int issue_flags);
|
|
|
|
int io_close_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
int io_close(struct io_kiocb *req, unsigned int issue_flags);
|
|
|
|
int io_pipe_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
int io_pipe(struct io_kiocb *req, unsigned int issue_flags);
|
|
|
|
int io_install_fixed_fd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
int io_install_fixed_fd(struct io_kiocb *req, unsigned int issue_flags);
|