mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 23:08:22 -04:00
kern: update KLightConditionVariable
This commit is contained in:
parent
b4498734e4
commit
c62a7381f8
3 changed files with 35 additions and 12 deletions
|
@ -492,7 +492,7 @@ namespace ams::kern::board::nintendo::nx {
|
|||
/* Wait for a request. */
|
||||
{
|
||||
KScopedLightLock lk(g_cv_lock);
|
||||
while (!(g_sleep_target_cores & target_core_mask)) {
|
||||
while ((g_sleep_target_cores & target_core_mask) == 0) {
|
||||
g_cv.Wait(std::addressof(g_cv_lock));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,8 +146,12 @@ namespace ams::kern {
|
|||
|
||||
if (m_current_hints[which] + value <= m_limit_values[which] && (timeout < 0 || KHardwareTimer::GetTick() < timeout)) {
|
||||
m_waiter_count++;
|
||||
m_cond_var.Wait(&m_lock, timeout);
|
||||
m_cond_var.Wait(&m_lock, timeout, false);
|
||||
m_waiter_count--;
|
||||
|
||||
if (GetCurrentThread().IsTerminationRequested()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue