mirror of https://github.com/FOME-Tech/fome-fw.git
Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
1794f7f953
|
@ -18,15 +18,9 @@ extern "C"
|
|||
#endif /* __cplusplus */
|
||||
#ifndef __ASSEMBLER__
|
||||
void firmwareError(obd_code_e code, const char *fmt, ...);
|
||||
#if ENABLE_PERF_TRACE
|
||||
void irqEnterHook(void);
|
||||
void irqExitHook(void);
|
||||
void contextSwitchHook(void);
|
||||
#else /* EFI_CLOCK_LOCKS */
|
||||
#define irqEnterHook() {}
|
||||
#define irqExitHook() {}
|
||||
#define contextSwitchHook() {}
|
||||
#endif /*EFI_CLOCK_LOCKS */
|
||||
void irqEnterHook(void);
|
||||
void irqExitHook(void);
|
||||
void contextSwitchHook(void);
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -67,4 +61,28 @@ extern "C" {
|
|||
#endif /* _FROM_ASM_ */
|
||||
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
contextSwitchHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
irqEnterHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
irqExitHook(); \
|
||||
}
|
||||
|
||||
#endif /* CONFIG_CHCONF_COMMON_H_ */
|
||||
|
|
|
@ -664,30 +664,6 @@
|
|||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
contextSwitchHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
irqEnterHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
irqExitHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
|
|
|
@ -664,30 +664,6 @@
|
|||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
contextSwitchHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
irqEnterHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
irqExitHook(); \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
|
|
|
@ -16,11 +16,11 @@ extern LoggingWithStorage sharedLogger;
|
|||
|
||||
#if ENABLE_PERF_TRACE
|
||||
|
||||
void irqEnterHook(void) {
|
||||
void irqEnterHook() {
|
||||
perfEventBegin(PE::ISR);
|
||||
}
|
||||
|
||||
void irqExitHook(void) {
|
||||
void irqExitHook() {
|
||||
perfEventEnd(PE::ISR);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,10 @@ void contextSwitchHook() {
|
|||
perfEventInstantGlobal(PE::ContextSwitch);
|
||||
}
|
||||
|
||||
#else
|
||||
void irqEnterHook() {}
|
||||
void irqExitHook() {}
|
||||
void contextSwitchHook() {}
|
||||
#endif /* ENABLE_PERF_TRACE */
|
||||
|
||||
#if EFI_ENABLE_MOCK_ADC
|
||||
|
|
Loading…
Reference in New Issue