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 c722341d3f
commit 9acbc45a80
Signed by: asleepymoon
GPG Key ID: 7F4BD1EBD1D53E5A
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();
init.state = .Running;
thread.enterTask(init);
}

View File

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