1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-19 08:52:25 +00:00

thermosphère: fix deadlock

This commit is contained in:
TuxSH 2020-02-02 19:03:04 +00:00
parent f1a241ffef
commit 67daf5a73e

View file

@ -159,8 +159,11 @@ TransportInterface *transportInterfaceCreate(
void transportInterfaceAcquire(TransportInterface *iface)
{
// Allow interrupts to be taken here if the caller allows it
recursiveSpinlockLock(&iface->lock);
// Get the lock, prevent the interrupt from being pending if there's incoming data
u64 flags = recursiveSpinlockLockMaskIrq(&iface->lock);
u64 flags = maskIrq();
switch (iface->type) {
case TRANSPORT_INTERFACE_TYPE_UART: {