summaryrefslogtreecommitdiff
path: root/Kernel/Syscall.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-02-05 19:42:43 +0300
committerAndreas Kling <kling@serenityos.org>2020-02-05 18:14:37 +0100
commitb3a24d732d22a7ebbb2ded76bc056cd985ae48fe (patch)
tree8097d7c5656e57bff0bae5250c2180004f870081 /Kernel/Syscall.h
parenta6cb7f759e0f75306218bb1b5202df67c211456b (diff)
downloadserenity-b3a24d732d22a7ebbb2ded76bc056cd985ae48fe.zip
Kernel+LibC: Add sys$waitid(), and make sys$waitpid() wrap it
sys$waitid() takes an explicit description of whether it's waiting for a single process with the given PID, all of the children, a group, etc., and returns its info as a siginfo_t. It also doesn't automatically imply WEXITED, which clears up the confusion in the kernel.
Diffstat (limited to 'Kernel/Syscall.h')
-rw-r--r--Kernel/Syscall.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Kernel/Syscall.h b/Kernel/Syscall.h
index 19f755a99e..27dfb1dc7f 100644
--- a/Kernel/Syscall.h
+++ b/Kernel/Syscall.h
@@ -36,6 +36,7 @@ extern "C" {
struct timeval;
struct timespec;
struct sockaddr;
+struct siginfo;
typedef u32 socklen_t;
}
@@ -51,7 +52,7 @@ typedef u32 socklen_t;
__ENUMERATE_SYSCALL(exit) \
__ENUMERATE_SYSCALL(getgid) \
__ENUMERATE_SYSCALL(getpid) \
- __ENUMERATE_SYSCALL(waitpid) \
+ __ENUMERATE_SYSCALL(waitid) \
__ENUMERATE_SYSCALL(mmap) \
__ENUMERATE_SYSCALL(munmap) \
__ENUMERATE_SYSCALL(get_dir_entries) \
@@ -404,6 +405,13 @@ struct SC_unveil_params {
StringArgument permissions;
};
+struct SC_waitid_params {
+ int idtype;
+ int id;
+ struct siginfo* infop;
+ int options;
+};
+
void initialize();
int sync();