aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/interrupts.zig2
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