From 8f6c9523312d704d7a802b1f7b73115c85d7b359 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 18 Feb 2025 19:30:46 +0100 Subject: [PATCH] core: Set new threads' priority to 127 This is halfway through the priority range, so user processes can either lower or raise their priority from the default. --- core/src/thread.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/thread.zig b/core/src/thread.zig index 7632eca..bd02e36 100644 --- a/core/src/thread.zig +++ b/core/src/thread.zig @@ -108,7 +108,7 @@ pub fn createThreadControlBlock(allocator: *pmm.FrameAllocator) !*ThreadControlB thread.mapper = null; thread.regs = std.mem.zeroes(@TypeOf(thread.regs)); thread.state = .Inactive; - thread.user_priority = 0; + thread.user_priority = 127; return thread; }