diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
| commit | fc00c656c96528112d05cf0edf8631bd5eaea446 (patch) | |
| tree | a6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /lib/libc/wait | |
Add build system scaffolding and libc headers
Diffstat (limited to 'lib/libc/wait')
| -rw-r--r-- | lib/libc/wait/wait.c | 7 | ||||
| -rw-r--r-- | lib/libc/wait/waitid.c | 7 | ||||
| -rw-r--r-- | lib/libc/wait/waitpid.c | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/lib/libc/wait/wait.c b/lib/libc/wait/wait.c new file mode 100644 index 00000000..f0583bfc --- /dev/null +++ b/lib/libc/wait/wait.c @@ -0,0 +1,7 @@ +#include <sys/wait.h> +#include <syscall.h> + +pid_t wait(int *stat_loc) +{ + return syscall(wait4, -1, stat_loc, 0, 0); +} diff --git a/lib/libc/wait/waitid.c b/lib/libc/wait/waitid.c new file mode 100644 index 00000000..5b6237b8 --- /dev/null +++ b/lib/libc/wait/waitid.c @@ -0,0 +1,7 @@ +#include <sys/wait.h> +#include <syscall.h> + +int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options) +{ + return syscall(waitid, idtype, id, infop, options); +} diff --git a/lib/libc/wait/waitpid.c b/lib/libc/wait/waitpid.c new file mode 100644 index 00000000..a5746efc --- /dev/null +++ b/lib/libc/wait/waitpid.c @@ -0,0 +1,7 @@ +#include <sys/wait.h> +#include <syscall.h> + +pid_t waitpid(pid_t pid, int *stat_loc, int options) +{ + return syscall(wait4, pid, stat_loc, options, 0); +} |
