diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-01 19:23:57 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-01 19:24:15 +0200 |
commit | e132f69a8adea80e8bf668f67edc2e27e9183648 (patch) | |
tree | 96c68004b371483d59a457de53f4cb2ab0047016 /src/process.zig | |
parent | eb8bc65a151d818253890ec0dd5e328249f926d5 (diff) |
process: Leave all channels on termination
Fixes #72.
Diffstat (limited to 'src/process.zig')
-rw-r--r-- | src/process.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/process.zig b/src/process.zig index 1b1486b..9970f2e 100644 --- a/src/process.zig +++ b/src/process.zig @@ -5,6 +5,7 @@ const builtin = @import("builtin"); const std = @import("std"); const TrapFrame = @import("TrapFrame.zig"); +const channel = @import("channel.zig"); const paging = @import("paging.zig"); const riscv = @import("riscv.zig"); const time = @import("sbi/time.zig"); @@ -114,6 +115,8 @@ pub const Info = struct { paging.free(self.stack); if (self.thread_id == 0) { + channel.leaveAll(self.id); + self.page_table.unmap(); paging.free(self.page_table); self.freeSections(); |