Add HLERequestContext::RunAsync (#7027)

This commit is contained in:
PabloMK7 2023-10-02 20:09:27 +02:00 committed by GitHub
parent 38a0a85777
commit 9ec4954380
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 103 additions and 14 deletions

View file

@ -244,13 +244,15 @@ void ThreadManager::ThreadWakeupCallback(u64 thread_id, s64 cycles_late) {
thread->ResumeFromWait();
}
void Thread::WakeAfterDelay(s64 nanoseconds) {
void Thread::WakeAfterDelay(s64 nanoseconds, bool thread_safe_mode) {
// Don't schedule a wakeup if the thread wants to wait forever
if (nanoseconds == -1)
return;
size_t core = thread_safe_mode ? core_id : std::numeric_limits<std::size_t>::max();
thread_manager.kernel.timing.ScheduleEvent(nsToCycles(nanoseconds),
thread_manager.ThreadWakeupEventType, thread_id);
thread_manager.ThreadWakeupEventType, thread_id,
core, thread_safe_mode);
}
void Thread::ResumeFromWait() {