diff options
author | Himbeer <himbeer@disroot.org> | 2024-07-31 14:35:42 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-07-31 14:35:42 +0200 |
commit | 435dfb5450d9ab58baff877c6a4eef360fff31ab (patch) | |
tree | 9762fed76055483cdda40170b711d36f2c205d3b | |
parent | 6de02a4e4dc625eb8a01f84083d2b722b78882a5 (diff) |
root: Add processId 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 a93492f..fbc060e 100644 --- a/src/root.zig +++ b/src/root.zig @@ -69,3 +69,8 @@ pub fn terminate(pid: u16, thread: usize) !void { const result = ecall(100004, .{ pid, thread }); if (result.error_code != 0) return SyscallError.Kernel; } + +pub fn processId() u16 { + const result = ecall(100005, .{}); + return result.value; +} |