Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
a43bad526b
|
@ -52,47 +52,12 @@
|
|||
|
||||
#define CHPRINTF_USE_FLOAT TRUE
|
||||
|
||||
#if !defined(EFI_CLOCK_LOCKS) || defined(__DOXYGEN__)
|
||||
#if !defined(ENABLE_PERF_TRACE) || defined(__DOXYGEN__)
|
||||
// looks like this value could not be defined in efifeatures.h - please define either externally or just change the value here
|
||||
#define EFI_CLOCK_LOCKS FALSE
|
||||
#endif /* EFI_CLOCK_LOCKS */
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
#endif /* ENABLE_PERF_TRACE */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
#ifndef __ASSEMBLER__
|
||||
#if EFI_CLOCK_LOCKS
|
||||
void irqEnterHook(void);
|
||||
void irqExitHook(void);
|
||||
#else /* EFI_CLOCK_LOCKS */
|
||||
#define irqEnterHook() {}
|
||||
#define irqExitHook() {}
|
||||
#endif /*EFI_CLOCK_LOCKS */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if EFI_CLOCK_LOCKS
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
#ifndef __ASSEMBLER__
|
||||
void onLockHook(void);
|
||||
void onUnlockHook(void);
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#define ON_LOCK_HOOK onLockHook()
|
||||
#define ON_UNLOCK_HOOK onUnlockHook()
|
||||
#else /* EFI_CLOCK_LOCKS */
|
||||
#define ON_LOCK_HOOK
|
||||
#define ON_UNLOCK_HOOK
|
||||
#endif /* EFI_CLOCK_LOCKS */
|
||||
#include "chconf_common.h"
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
|
@ -708,30 +673,6 @@ extern "C"
|
|||
/* 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) { \
|
||||
/* Context switch code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
|
|
@ -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