mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-20 18:42:40 +02:00
kern: wait 100us after synchronizing cores before saving interrupt state on sleep
This commit is contained in:
parent
4eefa84c42
commit
69f113b87b
@ -524,6 +524,14 @@ namespace ams::kern::board::nintendo::nx {
|
||||
/* Ensure that all cores get to this point before continuing. */
|
||||
cpu::SynchronizeAllCores();
|
||||
|
||||
/* Wait 100us before continuing. */
|
||||
{
|
||||
const s64 timeout = KHardwareTimer::GetTick() + ams::svc::Tick(TimeSpan::FromMicroSeconds(100));
|
||||
while (KHardwareTimer::GetTick() < timeout) {
|
||||
__asm__ __volatile__("" ::: "memory");
|
||||
}
|
||||
}
|
||||
|
||||
/* Save the interrupt manager's state. */
|
||||
Kernel::GetInterruptManager().Save(core_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user