mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-26 12:12:02 +00:00
Fix gamecard deadlock.
This commit is contained in:
parent
2e48a22f8c
commit
109913cb18
1 changed files with 1 additions and 8 deletions
|
@ -520,16 +520,11 @@ static int gamecardDetectionThreadFunc(void *arg)
|
||||||
Waiter gamecard_event_waiter = waiterForEvent(&g_gameCardKernelEvent);
|
Waiter gamecard_event_waiter = waiterForEvent(&g_gameCardKernelEvent);
|
||||||
Waiter exit_event_waiter = waiterForUEvent(&g_gameCardDetectionThreadExitEvent);
|
Waiter exit_event_waiter = waiterForUEvent(&g_gameCardDetectionThreadExitEvent);
|
||||||
|
|
||||||
mutexLock(&g_gamecardMutex);
|
|
||||||
|
|
||||||
/* Retrieve initial gamecard insertion status */
|
/* Retrieve initial gamecard insertion status */
|
||||||
g_gameCardInserted = prev_status = gamecardIsInserted();
|
|
||||||
|
|
||||||
/* Load gamecard info right away if a gamecard is inserted */
|
/* Load gamecard info right away if a gamecard is inserted */
|
||||||
|
g_gameCardInserted = prev_status = gamecardIsInserted();
|
||||||
if (g_gameCardInserted) gamecardLoadInfo();
|
if (g_gameCardInserted) gamecardLoadInfo();
|
||||||
|
|
||||||
mutexUnlock(&g_gamecardMutex);
|
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
/* Wait until an event is triggered */
|
/* Wait until an event is triggered */
|
||||||
|
@ -563,10 +558,8 @@ static int gamecardDetectionThreadFunc(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free gamecard info and close gamecard handle */
|
/* Free gamecard info and close gamecard handle */
|
||||||
mutexLock(&g_gamecardMutex);
|
|
||||||
gamecardFreeInfo();
|
gamecardFreeInfo();
|
||||||
g_gameCardInserted = false;
|
g_gameCardInserted = false;
|
||||||
mutexUnlock(&g_gamecardMutex);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue