diff options
author | Himbeer <himbeer@disroot.org> | 2024-06-13 18:47:17 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-06-13 18:47:17 +0200 |
commit | b53cb2af26b43db9c7daa06d9fa2770679de04c8 (patch) | |
tree | e1ebb33eb51d96154f7026558c161331d2c051f3 /src/lib/interrupts.zig | |
parent | aea99ef7bb5b03f6bcf638d50c65922f151b305b (diff) |
interrupts: Use .user enum literal for previous_privilege check
Diffstat (limited to 'src/lib/interrupts.zig')
-rw-r--r-- | src/lib/interrupts.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/interrupts.zig b/src/lib/interrupts.zig index 3aec2ac..f9a9ca1 100644 --- a/src/lib/interrupts.zig +++ b/src/lib/interrupts.zig @@ -99,7 +99,7 @@ export fn handleTrap(epc: usize, tval: usize, cause_bits: usize, frame: *trap.Fr switch (@as(AsyncCause, @enumFromInt(cause.num))) { .supervisor_software => w.print("Hart {d}: Software interrupt\r\n", .{frame.hart_id}) catch unreachable, .supervisor_timer => { - if (status.previous_privilege == 0) { + if (status.previous_privilege == .user) { // Trapped from U-mode, update pc for next time slice. // // We can simply use the last node of the process list here |