mmc_card: no zombie threads please
This commit is contained in:
parent
8f45cf697f
commit
0601c4b6bf
|
@ -570,19 +570,25 @@ static THD_FUNCTION(MMCmonThread, arg) {
|
||||||
chThdSleepMilliseconds(300);
|
chThdSleepMilliseconds(300);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!mountMmc()) {
|
if (mountMmc()) {
|
||||||
|
#if EFI_TUNER_STUDIO
|
||||||
|
engine->outputChannels.sd_logging_internal = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (engineConfiguration->sdTriggerLog) {
|
||||||
|
sdTriggerLogger();
|
||||||
|
} else {
|
||||||
|
mlgLogger();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// no card present (or mounted via USB), don't do internal logging
|
// no card present (or mounted via USB), don't do internal logging
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
efiPrintf("SD logger has died!");
|
||||||
engine->outputChannels.sd_logging_internal = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (engineConfiguration->sdTriggerLog) {
|
// exiting thread will create zombie!
|
||||||
sdTriggerLogger();
|
while(1) {
|
||||||
} else {
|
chThdSleepMilliseconds(100);
|
||||||
mlgLogger();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue