summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/kernel.h5
-rw-r--r--src/core/hle/kernel/thread.cpp6
2 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 9cf288b08..73fab3981 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
#include <boost/smart_ptr/intrusive_ptr.hpp>
+#include "common/assert.h"
#include "common/common_types.h"
namespace Kernel {
@@ -84,6 +85,8 @@ public:
case HandleType::ClientSession:
return false;
}
+
+ UNREACHABLE();
}
public:
@@ -129,4 +132,4 @@ void Init(u32 system_mode);
/// Shutdown the kernel
void Shutdown();
-} // namespace
+} // namespace Kernel
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index f77c39d18..324415a36 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -490,8 +490,6 @@ void Thread::BoostPriority(s32 priority) {
}
SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) {
- DEBUG_ASSERT(!GetCurrentThread());
-
// Initialize new "main" thread
auto thread_res = Thread::Create("main", entry_point, priority, 0, THREADPROCESSORID_0,
Memory::HEAP_VADDR_END);
@@ -501,9 +499,7 @@ SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) {
thread->context.fpscr =
FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010
- // Run new "main" thread
- SwitchContext(thread.get());
-
+ // Note: The newly created thread will be run when the scheduler fires.
return thread;
}