mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 07:04:24 -04:00
kern: fix bug in SvcSetThreadPriority
This commit is contained in:
parent
94f9cc1626
commit
5b8a20dbf7
3 changed files with 17 additions and 1 deletions
|
@ -384,6 +384,19 @@ namespace ams::kern {
|
|||
}
|
||||
}
|
||||
|
||||
void KThread::SetBasePriority(s32 priority) {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
MESOSPHERE_ASSERT(ams::svc::HighestThreadPriority <= priority && priority <= ams::svc::LowestThreadPriority);
|
||||
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
/* Change our base priority. */
|
||||
this->base_priority = priority;
|
||||
|
||||
/* Perform a priority restoration. */
|
||||
RestorePriority(this);
|
||||
}
|
||||
|
||||
Result KThread::SetPriorityToIdle() {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue