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 SetDummyThreadOwner(Process* process);
void SetInitProcess(Process* init); void SetInitProcess(Process* init);
Process* GetInitProcess(); Process* GetInitProcess();
Process* GetKernelProcess();
} // namespace Scheduler } // namespace Scheduler

View File

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