diff options
author | Himbeer <himbeer@disroot.org> | 2024-07-31 14:33:15 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-07-31 14:33:15 +0200 |
commit | 6de02a4e4dc625eb8a01f84083d2b722b78882a5 (patch) | |
tree | aa942eabb18b50d88910b100dded0c41f80dd3a9 | |
parent | 15449d6daaead05841e2df47240616d1e4fe842f (diff) |
root: Add terminate syscall
-rw-r--r-- | src/root.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/root.zig b/src/root.zig index 2c56957..a93492f 100644 --- a/src/root.zig +++ b/src/root.zig @@ -64,3 +64,8 @@ pub fn launch(bytes: []align(@alignOf(std.elf.Elf64_Ehdr)) const u8) !usize { pub fn end() noreturn { ecall(100003, .{}); } + +pub fn terminate(pid: u16, thread: usize) !void { + const result = ecall(100004, .{ pid, thread }); + if (result.error_code != 0) return SyscallError.Kernel; +} |