forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exit: add internal include file with helpers
Move struct wait_opts and waitid_info into kernel/exit.h, and include function declarations for the recently added helpers. Make them non-static as well. This is in preparation for adding a waitid operation through io_uring. With the abtracted helpers, this is now possible. Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |