core: Add some annotations to managed thread variables

Some thread variables don't need to be set manually,
since they are updated whenever needed by some functions.
Add comments to make that clear.
This commit is contained in:
Gabriel 2025-02-20 17:59:27 +01:00
parent 8ea5df2e4e
commit 2ecd24df82
Signed by: asleepymoon
GPG Key ID: 7F4BD1EBD1D53E5A

View File

@ -17,12 +17,13 @@ pub const ThreadControlBlock = struct {
mapper: ?vmm.MemoryMapper,
regs: interrupts.InterruptStackFrame,
state: ThreadState,
ticks: u64,
user_priority: u8,
current_priority: u32,
// Managed by scheduleNewTask(), no need to set manually.
ticks: u64,
// Managed by addThreadToPriorityQueue(), no need to set manually.
current_priority: u32,
// Managed by startSleep(), no need to set manually.
sleep_ticks: u64,
};