1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Add GetKernelProcess function to scheduler.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-12-23 18:52:12 +01:00
parent 193b76f8cb
commit 907acf1e18
2 changed files with 6 additions and 0 deletions

View file

@ -55,6 +55,7 @@ void SetIdleThread(Thread* thread);
void SetDummyThreadOwner(Process* process);
void SetInitProcess(Process* init);
Process* GetInitProcess();
Process* GetKernelProcess();
} // namespace Scheduler

View file

@ -225,6 +225,11 @@ Process* GetInitProcess()
return initprocess;
}
Process* GetKernelProcess()
{
return idlethread->process;
}
void SetThreadState(Thread* thread, ThreadState state)
{
bool wasenabled = Interrupt::SetEnabled(false);