mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 23:24:26 -04:00
kern: minor fixes to prevent core0-2 panics during boot
This commit is contained in:
parent
bb3f7c8ab9
commit
d2a888d9e8
5 changed files with 26 additions and 5 deletions
|
@ -260,8 +260,24 @@ namespace ams::kern {
|
|||
return this->signaled;
|
||||
}
|
||||
|
||||
void KThread::Wakeup() {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
if (this->GetState() == ThreadState_Waiting) {
|
||||
if (this->sleeping_queue != nullptr) {
|
||||
this->sleeping_queue->WakeupThread(this);
|
||||
} else {
|
||||
this->SetState(ThreadState_Runnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KThread::OnTimer() {
|
||||
MESOSPHERE_TODO_IMPLEMENT();
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
MESOSPHERE_ASSERT(KScheduler::IsSchedulerLockedByCurrentThread());
|
||||
|
||||
this->Wakeup();
|
||||
}
|
||||
|
||||
void KThread::DoWorkerTask() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue