summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-12-28 02:28:15 +0100
committerLioncash <mathew1800@gmail.com>2018-12-28 02:32:30 +0100
commit771431f62539a991cc4d8cf5dc4908bb5b366da2 (patch)
treedb724de34e5e8a8326ce1a061553520cbd157944 /src/core/hle/kernel/thread.cpp
parentMerge pull request #1951 from Tinob/master (diff)
downloadyuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.tar
yuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.tar.gz
yuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.tar.bz2
yuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.tar.lz
yuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.tar.xz
yuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.tar.zst
yuzu-771431f62539a991cc4d8cf5dc4908bb5b366da2.zip
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 434655638..d3984dfc4 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -12,7 +12,6 @@
#include "common/assert.h"
#include "common/common_types.h"
#include "common/logging/log.h"
-#include "common/math_util.h"
#include "common/thread_queue_list.h"
#include "core/arm/arm_interface.h"
#include "core/core.h"
@@ -232,29 +231,6 @@ void Thread::BoostPriority(u32 priority) {
current_priority = priority;
}
-SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 priority,
- Process& owner_process) {
- // Setup page table so we can write to memory
- SetCurrentPageTable(&owner_process.VMManager().page_table);
-
- // Initialize new "main" thread
- const VAddr stack_top = owner_process.VMManager().GetTLSIORegionEndAddress();
- auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0, THREADPROCESSORID_0,
- stack_top, owner_process);
-
- SharedPtr<Thread> thread = std::move(thread_res).Unwrap();
-
- // Register 1 must be a handle to the main thread
- const Handle guest_handle = owner_process.GetHandleTable().Create(thread).Unwrap();
- thread->SetGuestHandle(guest_handle);
- thread->GetContext().cpu_registers[1] = guest_handle;
-
- // Threads by default are dormant, wake up the main thread so it runs when the scheduler fires
- thread->ResumeFromWait();
-
- return thread;
-}
-
void Thread::SetWaitSynchronizationResult(ResultCode result) {
context.cpu_registers[0] = result.raw;
}