kernel/thread: Migrate WaitCurrentThread_Sleep into the Thread interface

Rather than make a global accessor for this sort of thing. We can make
it a part of the thread interface itself. This allows getting rid of a
hidden global accessor in the kernel code.
This commit is contained in:
Lioncash 2019-03-15 23:28:29 -04:00
parent 3bfd199497
commit c892cf01fa
4 changed files with 24 additions and 25 deletions

View file

@ -383,6 +383,9 @@ public:
void SetActivity(ThreadActivity value);
/// Sleeps this thread for the given amount of nanoseconds.
void Sleep(s64 nanoseconds);
private:
explicit Thread(KernelCore& kernel);
~Thread() override;
@ -460,11 +463,6 @@ private:
*/
Thread* GetCurrentThread();
/**
* Waits the current thread on a sleep
*/
void WaitCurrentThread_Sleep();
/**
* Stops the current thread and removes it from the thread_list
*/