wider usage of EFI_CLOCK_LOCKS
This commit is contained in:
parent
4750d49844
commit
2e70da24db
|
@ -113,9 +113,9 @@ bool warning(obd_code_e code, const char *fmt, ...) {
|
||||||
|
|
||||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||||
printf("sim_warning %s\r\n", fmt);
|
printf("sim_warning %s\r\n", fmt);
|
||||||
#endif
|
#endif /* EFI_SIMULATOR */
|
||||||
|
|
||||||
#if EFI_SIMULATOR || EFI_PROD_CODE
|
#if EFI_SIMULATOR || EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
efiAssert(isWarningStreamInitialized, "warn stream not initialized", false);
|
efiAssert(isWarningStreamInitialized, "warn stream not initialized", false);
|
||||||
addWarningCode(code);
|
addWarningCode(code);
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ bool warning(obd_code_e code, const char *fmt, ...) {
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
printf("\r\n");
|
printf("\r\n");
|
||||||
|
|
||||||
#endif
|
#endif /* EFI_SIMULATOR || EFI_PROD_CODE */
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,6 +154,8 @@ char *getWarning(void) {
|
||||||
return warningBuffer;
|
return warningBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__)
|
||||||
uint32_t lastLockTime;
|
uint32_t lastLockTime;
|
||||||
/**
|
/**
|
||||||
* Maximum time before requesting lock and releasing lock at the end of critical section
|
* Maximum time before requesting lock and releasing lock at the end of critical section
|
||||||
|
@ -175,6 +177,9 @@ void onUnlockHook(void) {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* EFI_CLOCK_LOCKS */
|
||||||
|
|
||||||
|
|
||||||
void initErrorHandling(void) {
|
void initErrorHandling(void) {
|
||||||
#if EFI_SIMULATOR || EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_SIMULATOR || EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
msObjectInit(&warningStream, (uint8_t *) warningBuffer, WARNING_BUFFER_SIZE, 0);
|
msObjectInit(&warningStream, (uint8_t *) warningBuffer, WARNING_BUFFER_SIZE, 0);
|
||||||
|
|
|
@ -406,7 +406,10 @@ void resetMaxValues() {
|
||||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
||||||
maxEventCallbackDuration = triggerMaxDuration = 0;
|
maxEventCallbackDuration = triggerMaxDuration = 0;
|
||||||
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
||||||
|
|
||||||
|
#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__)
|
||||||
maxLockedDuration = 0;
|
maxLockedDuration = 0;
|
||||||
|
#endif /* EFI_CLOCK_LOCKS */
|
||||||
|
|
||||||
#if (EFI_PROD_CODE) || defined(__DOXYGEN__)
|
#if (EFI_PROD_CODE) || defined(__DOXYGEN__)
|
||||||
maxPrecisionCallbackDuration = 0;
|
maxPrecisionCallbackDuration = 0;
|
||||||
|
@ -503,7 +506,10 @@ void triggerInfo(void) {
|
||||||
engine->m.rpmCbTime,
|
engine->m.rpmCbTime,
|
||||||
engine->m.mainTriggerCallbackTime);
|
engine->m.mainTriggerCallbackTime);
|
||||||
|
|
||||||
|
#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__)
|
||||||
scheduleMsg(logger, "maxLockedDuration=%d / maxTriggerReentraint=%d", maxLockedDuration, maxTriggerReentraint);
|
scheduleMsg(logger, "maxLockedDuration=%d / maxTriggerReentraint=%d", maxLockedDuration, maxTriggerReentraint);
|
||||||
|
#endif /* EFI_CLOCK_LOCKS */
|
||||||
|
|
||||||
scheduleMsg(logger, "maxEventCallbackDuration=%d", maxEventCallbackDuration);
|
scheduleMsg(logger, "maxEventCallbackDuration=%d", maxEventCallbackDuration);
|
||||||
|
|
||||||
scheduleMsg(logger, "hipLastExecutionCount=%d", hipLastExecutionCount);
|
scheduleMsg(logger, "hipLastExecutionCount=%d", hipLastExecutionCount);
|
||||||
|
|
|
@ -114,7 +114,9 @@ static void printStatus(void) {
|
||||||
static void setChartActive(int value) {
|
static void setChartActive(int value) {
|
||||||
engineConfiguration->isEngineChartEnabled = value;
|
engineConfiguration->isEngineChartEnabled = value;
|
||||||
printStatus();
|
printStatus();
|
||||||
maxLockedDuration = 0;
|
#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__)
|
||||||
|
maxLockedDuration = 0; // todo: why do we reset this here? why only this and not all metrics?
|
||||||
|
#endif /* EFI_CLOCK_LOCKS */
|
||||||
}
|
}
|
||||||
|
|
||||||
void setChartSize(int newSize) {
|
void setChartSize(int newSize) {
|
||||||
|
|
Loading…
Reference in New Issue