mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 12:50:04 +00:00
Add HLERequestContext::RunAsync (#7027)
This commit is contained in:
parent
38a0a85777
commit
9ec4954380
5 changed files with 103 additions and 14 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue