mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 18:30:06 +00:00
Kernel: Clang Format
This commit is contained in:
parent
c32520ceb7
commit
a3524879be
@ -414,7 +414,7 @@ u64 Scheduler::GetLastContextSwitchTicks() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Scheduler::TryDoContextSwitch() {
|
void Scheduler::TryDoContextSwitch() {
|
||||||
if (is_context_switch_pending ) {
|
if (is_context_switch_pending) {
|
||||||
SwitchContext();
|
SwitchContext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ Thread::~Thread() = default;
|
|||||||
void Thread::Stop() {
|
void Thread::Stop() {
|
||||||
// Cancel any outstanding wakeup events for this thread
|
// Cancel any outstanding wakeup events for this thread
|
||||||
Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(),
|
Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(),
|
||||||
callback_handle);
|
callback_handle);
|
||||||
kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle);
|
kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle);
|
||||||
callback_handle = 0;
|
callback_handle = 0;
|
||||||
SetStatus(ThreadStatus::Dead);
|
SetStatus(ThreadStatus::Dead);
|
||||||
@ -68,13 +68,13 @@ void Thread::WakeAfterDelay(s64 nanoseconds) {
|
|||||||
// This function might be called from any thread so we have to be cautious and use the
|
// This function might be called from any thread so we have to be cautious and use the
|
||||||
// thread-safe version of ScheduleEvent.
|
// thread-safe version of ScheduleEvent.
|
||||||
const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds});
|
const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds});
|
||||||
Core::System::GetInstance().CoreTiming().ScheduleEvent(cycles, kernel.ThreadWakeupCallbackEventType(),
|
Core::System::GetInstance().CoreTiming().ScheduleEvent(
|
||||||
callback_handle);
|
cycles, kernel.ThreadWakeupCallbackEventType(), callback_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Thread::CancelWakeupTimer() {
|
void Thread::CancelWakeupTimer() {
|
||||||
Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(),
|
Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(),
|
||||||
callback_handle);
|
callback_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::optional<s32> GetNextProcessorId(u64 mask) {
|
static std::optional<s32> GetNextProcessorId(u64 mask) {
|
||||||
|
Loading…
Reference in New Issue
Block a user