diff options
author | Tom <tomut@yahoo.com> | 2020-09-27 08:53:35 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-27 19:46:04 +0200 |
commit | 838d9fa251ed34289cb9c77eb46f889dc9e79416 (patch) | |
tree | 0efecf56806d2fff7ebfbe5b28288a8ac01c5600 /Kernel/Scheduler.h | |
parent | 079486ed7eba3d15567bb5ee9677c81dd190cffa (diff) | |
download | serenity-838d9fa251ed34289cb9c77eb46f889dc9e79416.zip |
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.
Diffstat (limited to 'Kernel/Scheduler.h')
-rw-r--r-- | Kernel/Scheduler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Scheduler.h b/Kernel/Scheduler.h index e4b2184ce5..cfe2717191 100644 --- a/Kernel/Scheduler.h +++ b/Kernel/Scheduler.h @@ -60,7 +60,7 @@ public: static timeval time_since_boot(); static bool yield(); static bool donate_to_and_switch(Thread*, const char* reason); - static bool donate_to(Thread*, const char* reason); + static bool donate_to(RefPtr<Thread>&, const char* reason); static bool context_switch(Thread*); static void enter_current(Thread& prev_thread); static void leave_on_first_switch(u32 flags); |