aboutsummaryrefslogtreecommitdiff
path: root/src/root.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/root.zig')
-rw-r--r--src/root.zig5
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;
+}