Revert "core: Switch to unique_ptr for usage of Common::Fiber."

This commit is contained in:
bunnei 2021-03-05 17:08:17 -08:00 committed by GitHub
parent 9d010be483
commit a5ab85ac37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 59 additions and 58 deletions

View file

@ -991,6 +991,10 @@ void KThread::SetState(ThreadState state) {
}
}
std::shared_ptr<Common::Fiber>& KThread::GetHostContext() {
return host_context;
}
ResultVal<std::shared_ptr<KThread>> KThread::Create(Core::System& system, ThreadType type_flags,
std::string name, VAddr entry_point,
u32 priority, u64 arg, s32 processor_id,
@ -1024,7 +1028,7 @@ ResultVal<std::shared_ptr<KThread>> KThread::Create(Core::System& system, Thread
scheduler.AddThread(thread);
thread->host_context =
std::make_unique<Common::Fiber>(std::move(thread_start_func), thread_start_parameter);
std::make_shared<Common::Fiber>(std::move(thread_start_func), thread_start_parameter);
return MakeResult<std::shared_ptr<KThread>>(std::move(thread));
}