Kernel: Make thread unblocking O(1)

This is still bit broken. VirtualBox seems to freeze sometimes, but I
could not recreate this on qemu (with and without kvm) or real hardware.
This commit is contained in:
2024-07-24 00:31:01 +03:00
parent 9548c592a3
commit bb1738db8c
10 changed files with 211 additions and 199 deletions

View File

@@ -238,10 +238,10 @@ namespace Kernel
asm volatile("invlpg (%0)" :: "r"(message->flush_tlb.vaddr + i * PAGE_SIZE) : "memory");
break;
case SMPMessage::Type::NewThread:
processor.m_scheduler->handle_new_thread_request(message->new_thread);
processor.m_scheduler->add_thread(message->new_thread);
break;
case SMPMessage::Type::UnblockThread:
processor.m_scheduler->handle_unblock_request(message->unblock_thread);
processor.m_scheduler->unblock_thread(message->unblock_thread);
break;
}