summaryrefslogtreecommitdiff
path: root/kernel/exit.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-10-17 17:26:38 +0300
committerJens Axboe <axboe@kernel.dk>2023-10-17 17:26:38 +0300
commitd451fdd0fe8323bf970b735cf276d4e11ae8cdcc (patch)
tree1dadfe90ff9c76df257289e5db98298d1988c527 /kernel/exit.h
parentae3059cf95f3bf11695d48b77f00568e87329aae (diff)
parentb3a4dbc89d4021b3f90ff6a13537111a004f9d07 (diff)
downloadlinux-d451fdd0fe8323bf970b735cf276d4e11ae8cdcc.tar.xz
Merge branch 'for-6.7/io_uring' into for-6.7/block
Merge in io_uring fixes, as the ublk simplifying cancelations and aborts depend on the two patches from Ming adding cancelation support for uring_cmd. * for-6.7/io_uring: io_uring/kbuf: Use slab for struct io_buffer objects io_uring/kbuf: Allow the full buffer id space for provided buffers io_uring/kbuf: Fix check of BID wrapping in provided buffers io_uring/rsrc: cleanup io_pin_pages() io_uring: cancelable uring_cmd io_uring: retain top 8bits of uring_cmd flags for kernel internal use io_uring: add IORING_OP_WAITID support exit: add internal include file with helpers exit: add kernel_waitid_prepare() helper exit: move core of do_wait() into helper exit: abstract out should_wake helper for child_wait_callback() io_uring/rw: add support for IORING_OP_READ_MULTISHOT io_uring/rw: mark readv/writev as vectored in the opcode definition io_uring/rw: split io_read() into a helper
Diffstat (limited to 'kernel/exit.h')
-rw-r--r--kernel/exit.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/exit.h b/kernel/exit.h
new file mode 100644
index 000000000000..278faa26a653
--- /dev/null
+++ b/kernel/exit.h
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#ifndef LINUX_WAITID_H
+#define LINUX_WAITID_H
+
+struct waitid_info {
+ pid_t pid;
+ uid_t uid;
+ int status;
+ int cause;
+};
+
+struct wait_opts {
+ enum pid_type wo_type;
+ int wo_flags;
+ struct pid *wo_pid;
+
+ struct waitid_info *wo_info;
+ int wo_stat;
+ struct rusage *wo_rusage;
+
+ wait_queue_entry_t child_wait;
+ int notask_error;
+};
+
+bool pid_child_should_wake(struct wait_opts *wo, struct task_struct *p);
+long __do_wait(struct wait_opts *wo);
+int kernel_waitid_prepare(struct wait_opts *wo, int which, pid_t upid,
+ struct waitid_info *infop, int options,
+ struct rusage *ru);
+#endif