Skip to content

Feature/stack reporter config

Mohamed Hassan requested to merge Hamzi/rtems:feature/stack-reporter-config into main

Summary

In this draft merge request I added a feature that make the stack checker function that reports a blown stack configurable. I followed the same pattern of CONFIGURE_TASK_STACK_ALLOCATOR which is configure at rtems/cpukit/include/rtems/confdefs/wkspace.h as follows:

  1. At include/rtems/confdefs/extenions.h I added the conditional configuration macros following CONFIGURE_TASK_STACK_ALLOCATOR provided here include/rtems/confdefs/wkspace.h
  2. Here include/rtems/confdefs/percpu.h I remove everything related to stack check configuration macros I added before.
  3. At include/rtems/stackchk.h I've defined the function pointer, declared a variable of it's type same as include/rtems/score/stack.h and mapped the configuration constants to the reporting function like bsps/include/bsp/stackalloc.h
  4. Modified libmisc/stackchk/check.c so that rtems_stack_checker_switch_extension call the function pointer instead of the default Stack_check_report_blown_task.

Merge request reports