Update spinlock to avoid hungry.

This commit is contained in:
TXuian
2024-03-19 10:12:51 +08:00
parent 50dab7b553
commit 08c8f0b952
7 changed files with 39 additions and 63 deletions
@@ -106,7 +106,7 @@ int task_exec(struct TaskMicroDescriptor* task, char* img_start, char* name, cha
for (int addr_offset = 0; addr_offset < ph.filesz; addr_offset += PAGE_SIZE) {
uintptr_t page_paddr = xizi_pager.address_translate(&pgdir, ph.vaddr + addr_offset);
if (page_paddr == 0) {
ERROR("copy elf file to unmapped addr");
ERROR("copy elf file to unmapped addr\n");
goto error_exec;
}
uintptr_t read_size = (ph.filesz - addr_offset < PAGE_SIZE ? ph.filesz - addr_offset : PAGE_SIZE);