Skip to content

Commit

Permalink
Reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbirccyn committed Nov 24, 2023
1 parent 4362069 commit 28a7bd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions autosar/tpl_as_stack_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions autosar/tpl_as_stack_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
*/
Expand Down

0 comments on commit 28a7bd5

Please sign in to comment.