mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-21 11:02:45 +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. */
|
/* Ensure that all cores get to this point before continuing. */
|
||||||
cpu::SynchronizeAllCores();
|
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. */
|
/* Save the interrupt manager's state. */
|
||||||
Kernel::GetInterruptManager().Save(core_id);
|
Kernel::GetInterruptManager().Save(core_id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user