RTEMS: Stack Checker Mechanism

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Macros | Functions
Stack Checker Mechanism
API » Classic

## Files
file | stackchk.h
| Stack Checker Information.
file | check.c
| Stack Overflow Check User Extension Set.

## Macros
#define | RTEMS_STACK_CHECKER_EXTENSION
| Stack Checker Extension Set Definition.

## Functions
bool | rtems_stack_checker_is_blown (void)
| Checks if current task is blown its stack.
void | rtems_stack_checker_report_usage (void)
| Print the stack usage report using printk.
void | rtems_stack_checker_report_usage_with_plugin (const rtems_printer *printer)
| Print the stack usage report using caller's routine.
bool | rtems_stack_checker_create_extension (Thread_Control *running, Thread_Control *the_thread)
| Stack Checker Task Create Extension.
void | rtems_stack_checker_begin_extension (Thread_Control *executing)
void | rtems_stack_checker_switch_extension (Thread_Control *running, Thread_Control *heir)
| Stack Checker Task Context Switch Extension.

## Detailed Description

## Macro Definition Documentation

## ◆ RTEMS_STACK_CHECKER_EXTENSION

#define RTEMS_STACK_CHECKER_EXTENSION

Value:
{ \
rtems_stack_checker_create_extension, /* rtems_task_create */ \
0, /* rtems_task_start */ \
0, /* rtems_task_restart */ \
0, /* rtems_task_delete */ \
rtems_stack_checker_switch_extension, /* task_switch */ \
rtems_stack_checker_begin_extension, /* task_begin */ \
0, /* task_exitted */ \
0, /* fatal */ \
0 /* terminate */ \
}
rtems_stack_checker_create_extension
bool rtems_stack_checker_create_extension(Thread_Control *running, Thread_Control *the_thread)
Stack Checker Task Create Extension.
rtems_stack_checker_switch_extension
void rtems_stack_checker_switch_extension(Thread_Control *running, Thread_Control *heir)
Stack Checker Task Context Switch Extension.
Definition: check.c:298

Stack Checker Extension Set Definition.

This macro defines the user extension handler set for the stack checker. This macro is normally only used by confdefs.h.

## Function Documentation

## ◆ rtems_stack_checker_create_extension()

bool rtems_stack_checker_create_extension | ( | Thread_Control * | running,
|  | Thread_Control * | the_thread
| ) |  |

Stack Checker Task Create Extension.

This method is the task create extension for the stack checker.

Parameters

  [in] | running | points to the currently executing task
  [in] | the_thread | points to the newly created task

Note
  If this this the first task created, the stack checker will automatically intialize itself.

## ◆ rtems_stack_checker_is_blown()

bool rtems_stack_checker_is_blown | ( | void |  | ) |

Checks if current task is blown its stack.

This method is used to determine if the current stack pointer of the currently executing task is within bounds.

Return values

  This | method returns true if the currently executing task has blown its stack.

## ◆ rtems_stack_checker_report_usage()

void rtems_stack_checker_report_usage | ( | void |  | ) |

Print the stack usage report using printk.

This method prints a stack usage report for the curently executing task.

Note
  It uses printk to print the report.

## ◆ rtems_stack_checker_report_usage_with_plugin()

void rtems_stack_checker_report_usage_with_plugin | ( | const rtems_printer * | printer | ) |

Print the stack usage report using caller's routine.

This method prints a stack usage report for the curently executing task.

Parameters

  [in] | context | is the context to pass to the print handler
  [in] | print | is the print handler

Note
  It uses the caller's routine to print the report.

## ◆ rtems_stack_checker_switch_extension()

void rtems_stack_checker_switch_extension | ( | Thread_Control * | running,
|  | Thread_Control * | heir
| ) |  |

Stack Checker Task Context Switch Extension.

This method is the task context switch extension for the stack checker.

Parameters

  [in] | running | points to the currently executing task which is being context switched out
  [in] | running | points to the heir task which we are switching to

Note
  This is called from the internal method _Thread_Dispatch.