mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
Kernel: Make Thread refcounted
Similar to Process, we need to make Thread refcounted. This will solve problems that will appear once we schedule threads on more than one processor. This allows us to hold onto threads without necessarily holding the scheduler lock for the entire duration.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Kernel {
|
||||
|
||||
void SyncTask::spawn()
|
||||
{
|
||||
Thread* syncd_thread = nullptr;
|
||||
RefPtr<Thread> syncd_thread;
|
||||
Process::create_kernel_process(syncd_thread, "SyncTask", [] {
|
||||
dbg() << "SyncTask is running";
|
||||
for (;;) {
|
||||
|
||||
Reference in New Issue
Block a user