core: Make thread.enterTask() automatically set the thread state to Running

This commit is contained in:
Gabriel 2025-02-21 18:40:29 +01:00
parent 14047e0c3c
commit 785335bd9a
2 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,6 @@ export fn _start(magic: u32, info: MultibootInfo) callconv(.C) noreturn {
platform.platformEndInit(); platform.platformEndInit();
init.state = .Running;
thread.enterTask(init); thread.enterTask(init);
} }

View File

@ -42,6 +42,8 @@ pub fn enterTask(task: *ThreadControlBlock) noreturn {
table = space.phys; table = space.phys;
} }
task.state = .Running;
arch.enterTask(&task.regs, vmm.PHYSICAL_MAPPING_BASE, table.address); arch.enterTask(&task.regs, vmm.PHYSICAL_MAPPING_BASE, table.address);
} }