mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:15:08 +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:
parent
079486ed7e
commit
838d9fa251
14 changed files with 136 additions and 90 deletions
|
@ -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 (;;) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue