parent
5db10d83f7
commit
54e4d90b6d
|
@ -258,6 +258,15 @@ void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// To be used from any thread, including the CPU thread
|
||||||
|
void ScheduleEvent_AnyThread(int cyclesIntoFuture, int event_type, u64 userdata)
|
||||||
|
{
|
||||||
|
if (Core::IsCPUThread())
|
||||||
|
ScheduleEvent(cyclesIntoFuture, event_type, userdata);
|
||||||
|
else
|
||||||
|
ScheduleEvent_Threadsafe(cyclesIntoFuture, event_type, userdata);
|
||||||
|
}
|
||||||
|
|
||||||
void ClearPendingEvents()
|
void ClearPendingEvents()
|
||||||
{
|
{
|
||||||
while (first)
|
while (first)
|
||||||
|
|
|
@ -48,6 +48,7 @@ void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||||
void ScheduleEvent_Immediate(int event_type, u64 userdata = 0);
|
void ScheduleEvent_Immediate(int event_type, u64 userdata = 0);
|
||||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||||
void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata = 0);
|
void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata = 0);
|
||||||
|
void ScheduleEvent_AnyThread(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||||
|
|
||||||
// We only permit one event of each type in the queue at a time.
|
// We only permit one event of each type in the queue at a time.
|
||||||
void RemoveEvent(int event_type);
|
void RemoveEvent(int event_type);
|
||||||
|
|
|
@ -223,8 +223,8 @@ void ToggleResetButtonCallback(u64 userdata, int cyclesLate)
|
||||||
|
|
||||||
void ResetButton_Tap()
|
void ResetButton_Tap()
|
||||||
{
|
{
|
||||||
CoreTiming::ScheduleEvent_Threadsafe(0, toggleResetButton, true);
|
CoreTiming::ScheduleEvent_AnyThread(0, toggleResetButton, true);
|
||||||
CoreTiming::ScheduleEvent_Threadsafe(243000000, toggleResetButton, false);
|
CoreTiming::ScheduleEvent_AnyThread(243000000, toggleResetButton, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ProcessorInterface
|
} // namespace ProcessorInterface
|
||||||
|
|
Loading…
Reference in New Issue