From c892cf01fad0c1fdeb6fc4644000c026176fe05a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 15 Mar 2019 23:28:29 -0400 Subject: 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. --- src/core/hle/kernel/thread.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index c48b21aba..d7c7a31f7 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -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 */ -- cgit v1.2.3 From 51d7f6bffcc0498a47abc7de27bf0906fc523dae Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 15 Mar 2019 23:38:51 -0400 Subject: kernel/thread: Move thread exiting logic from ExitCurrentThread to svcExitThread Puts the operation on global state in the same places as the rest of the svc calls. --- src/core/hle/kernel/thread.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index d7c7a31f7..ccdefeecc 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -463,9 +463,4 @@ private: */ Thread* GetCurrentThread(); -/** - * Stops the current thread and removes it from the thread_list - */ -void ExitCurrentThread(); - } // namespace Kernel -- cgit v1.2.3