mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 13:38:08 -05:00
hle: kernel: Migrate more of KThread to KAutoObject.
This commit is contained in:
@ -15,16 +15,12 @@
|
||||
namespace Kernel {
|
||||
|
||||
TimeManager::TimeManager(Core::System& system_) : system{system_} {
|
||||
time_manager_event_type = Core::Timing::CreateEvent(
|
||||
"Kernel::TimeManagerCallback",
|
||||
[this](std::uintptr_t thread_handle, std::chrono::nanoseconds) {
|
||||
std::shared_ptr<KThread> thread;
|
||||
{
|
||||
std::lock_guard lock{mutex};
|
||||
thread = SharedFrom<KThread>(reinterpret_cast<KThread*>(thread_handle));
|
||||
}
|
||||
thread->Wakeup();
|
||||
});
|
||||
time_manager_event_type =
|
||||
Core::Timing::CreateEvent("Kernel::TimeManagerCallback",
|
||||
[this](std::uintptr_t thread_handle, std::chrono::nanoseconds) {
|
||||
KThread* thread = reinterpret_cast<KThread*>(thread_handle);
|
||||
thread->Wakeup();
|
||||
});
|
||||
}
|
||||
|
||||
void TimeManager::ScheduleTimeEvent(KThread* thread, s64 nanoseconds) {
|
||||
|
Reference in New Issue
Block a user