mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 15:14:23 -04:00
kern: add KAddressArbiter::WaitIfEqual
This commit is contained in:
parent
01a7606f95
commit
a0cc22302c
8 changed files with 275 additions and 44 deletions
|
@ -94,7 +94,7 @@ namespace ams::kern {
|
|||
|
||||
/* Set parent and condvar tree. */
|
||||
this->parent = nullptr;
|
||||
this->cond_var = nullptr;
|
||||
this->condvar_tree = nullptr;
|
||||
|
||||
/* Set sync booleans. */
|
||||
this->signaled = false;
|
||||
|
@ -519,8 +519,8 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
/* Ensure we don't violate condition variable red black tree invariants. */
|
||||
if (auto *cond_var = thread->GetConditionVariable(); cond_var != nullptr) {
|
||||
cond_var->BeforeUpdatePriority(thread);
|
||||
if (auto *cv_tree = thread->GetConditionVariableTree(); cv_tree != nullptr) {
|
||||
BeforeUpdatePriority(cv_tree, thread);
|
||||
}
|
||||
|
||||
/* Change the priority. */
|
||||
|
@ -528,8 +528,8 @@ namespace ams::kern {
|
|||
thread->SetPriority(new_priority);
|
||||
|
||||
/* Restore the condition variable, if relevant. */
|
||||
if (auto *cond_var = thread->GetConditionVariable(); cond_var != nullptr) {
|
||||
cond_var->AfterUpdatePriority(thread);
|
||||
if (auto *cv_tree = thread->GetConditionVariableTree(); cv_tree != nullptr) {
|
||||
AfterUpdatePriority(cv_tree, thread);
|
||||
}
|
||||
|
||||
/* Update the scheduler. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue