From 1bb34bf6dd6b2698928cdd3905c32efcc561a372 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 7 Mar 2017 01:43:58 -0500 Subject: [PATCH] comments --- firmware/global.h | 4 ++-- unit_tests/global.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/global.h b/firmware/global.h index 459302cd0f..3ae240e44f 100644 --- a/firmware/global.h +++ b/firmware/global.h @@ -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 diff --git a/unit_tests/global.h b/unit_tests/global.h index f62c3f3383..fe409cc446 100644 --- a/unit_tests/global.h +++ b/unit_tests/global.h @@ -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