This commit is contained in:
rusefi 2017-03-07 01:43:58 -05:00
parent 8c80861846
commit 1bb34bf6dd
2 changed files with 5 additions and 2 deletions

View File

@ -76,9 +76,9 @@ typedef VirtualTimer virtual_timer_t;
* The following obscurantism is a hack to reduce stack usage, maybe even a questionable performance
* optimization.
*
* rusEfi main processing happends on IRQ so PORT_INT_REQUIRED_STACK has to be pretty large. Problem
* rusEfi main processing happens on IRQ so PORT_INT_REQUIRED_STACK has to be pretty large. Problem
* is that PORT_INT_REQUIRED_STACK is included within each user thread stack, thus this large stack multiplies
* and this consumes a lot of valueable RAM. While forcing the comiler to inline helps to some degree,
* and this consumes a lot of valueable RAM. While forcing the compiler to inline helps to some degree,
* it would be even better not to waste stack on passing the parameter.
*
* In the firmware we are using 'extern *Engine' - in the firmware Engine is a signleton

View File

@ -41,6 +41,9 @@ typedef int bool_t;
class Engine;
#endif
/**
* @see firmware/global.h for explanation
*/
#define DECLARE_ENGINE_PARAMETER_F Engine *engine, engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration
#define DECLARE_ENGINE_PARAMETER_S , Engine *engine, engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration
#define PASS_ENGINE_PARAMETER_F engine, engineConfiguration, config, boardConfiguration