diff --git a/autosar/tpl_as_stack_monitor.c b/autosar/tpl_as_stack_monitor.c index 676590e1b..07c36ec58 100644 --- a/autosar/tpl_as_stack_monitor.c +++ b/autosar/tpl_as_stack_monitor.c @@ -28,21 +28,19 @@ #include "tpl_memmap.h" #if WITH_AUTOSAR_STACK_MONITORING == YES -FUNC(void, OS_CODE) tpl_check_stack ( - CONST(tpl_proc_id, AUTOMATIC) proc_id) +FUNC(void, OS_CODE) tpl_check_stack(CONST(tpl_proc_id, AUTOMATIC) proc_id) { - CONSTP2CONST(tpl_stack, AUTOMATIC, OS_APPL_DATA) stack = - &(tpl_stat_proc_table[proc_id]->stack); + CONSTP2CONST(tpl_stack, AUTOMATIC, OS_APPL_DATA) + stack = &(tpl_stat_proc_table[proc_id]->stack); /* MISRA RULE 33 VIOLATION: MISRA rule 33 says the right hand of a && or || operator shall not contain side effects (function call for instance). However this is intended here because tpl_check_stack_footprint does not need to be evaluated if tpl_check_stack_pointer fails */ - if ((!tpl_check_stack_pointer(stack)) || - (!tpl_check_stack_footprint(stack))) + if ((!tpl_check_stack_pointer(stack)) || (!tpl_check_stack_footprint(stack))) { /* - * see §7.4.2 of AUTOSAR SWS OS 2.1, related to requirements + * see 7.4.2 of AUTOSAR SWS OS 2.1, related to requirements * OS068 and OS396 */ #if (SCALABILITY_CLASS == 1) || (SCALABILITY_CLASS == 2) diff --git a/autosar/tpl_as_stack_monitor.h b/autosar/tpl_as_stack_monitor.h index 300136ce6..6479b34bb 100644 --- a/autosar/tpl_as_stack_monitor.h +++ b/autosar/tpl_as_stack_monitor.h @@ -27,8 +27,8 @@ #ifndef TPL_AS_STACK_MONITOR_H #define TPL_AS_STACK_MONITOR_H_ -#include "tpl_machine_interface.h" #include "tpl_as_protec_hook.h" +#include "tpl_machine_interface.h" /** * @def SCALABILITY_CLASS @@ -48,7 +48,7 @@ * Do the stack monitoring checkings for the specified executable object and * call the #ProtectionHook if required. * - * @param this_exec_obj the executable object to monitor + * @param tpl_proc_id the id of the executable object to monitor * * @see #ProtectionHook */