source: rtems/cpukit/libmisc/stackchk/stackchk.h @ 70669f28

4.104.114.84.95
Last change on this file since 70669f28 was 4da36c1a, checked in by Joel Sherrill <joel.sherrill@…>, on 05/11/07 at 20:01:37

2007-05-11 Joel Sherrill <joel.sherrill@…>

  • libmisc/cpuuse/cpuuse.c, libmisc/stackchk/check.c, libmisc/stackchk/stackchk.h: Clean up as side-effect of making them suitable for inclusion in the Users Guide.
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/** @file rtems/stackchk.h
2 *
3 *  This include file contains information necessary to utilize
4 *  and install the stack checker mechanism.
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2007.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#ifndef __RTEMS_STACK_CHECKER_h
19#define __RTEMS_STACK_CHECKER_h
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/** @brief Has Current Task Blown Its Stack
26 *
27 *  This method is used to determine if the current stack pointer
28 *  of the currently executing task is within bounds.
29 *
30 *  @return This method returns true if the currently executing task
31 *  has blown its stack.
32 *
33 */
34boolean rtems_stack_checker_is_blown( void );
35
36/** @brief Print Stack Usage Report
37 *
38 *  This method prints a stack usage report for the curently executing
39 *  task.
40 *
41 *  @note It uses printk to print the report.
42 */
43void rtems_stack_checker_report_usage( void );
44
45/*************************************************************
46 *************************************************************
47 **  Prototyped only so the user extension can be installed **
48 *************************************************************
49 *************************************************************/
50
51/** @brief Stack Checker Task Create Extension
52 *
53 * This method is the task create extension for the stack checker.
54 *
55 * @param[in] running points to the currently executing task
56 * @param[in] the_thread points to the newly created task
57 *
58 * @note If this this the first task created, the stack checker
59 *       will automatically intialize itself.
60 */
61boolean rtems_stack_checker_create_extension(
62  Thread_Control *running,
63  Thread_Control *the_thread
64);
65
66/** @brief Stack Checker Task Begin Extension
67 *
68 * This method is the task begin extension for the stack checker.
69 *
70 * @param[in] the_thread points to task starting to execute
71 *
72 * @note This is called from the internal method _Thread_Handler.
73 */
74void rtems_stack_checker_begin_extension(
75  Thread_Control *the_thread
76);
77
78/** @brief Stack Checker Task Context Switch Extension
79 *
80 * This method is the task context switch extension for the stack checker.
81 *
82 * @param[in] running points to the currently executing task which
83 *            is being context switched out
84 * @param[in] running points to the heir task which we are switching to
85 *
86 * @note This is called from the internal method _Thread_Dispatch.
87 */
88void rtems_stack_checker_switch_extension(
89  Thread_Control *running,
90  Thread_Control *heir
91);
92
93/** @brief Stack Checker Extension Set Definition
94 *
95 *  This macro defines the user extension handler set for the stack
96 *  checker.  This macro is normally only used by confdefs.h.
97 */
98#define RTEMS_STACK_CHECKER_EXTENSION \
99{ \
100  rtems_stack_checker_create_extension,        /* rtems_task_create  */ \
101  0,                                           /* rtems_task_start   */ \
102  0,                                           /* rtems_task_restart */ \
103  0,                                           /* rtems_task_delete  */ \
104  rtems_stack_checker_switch_extension,        /* task_switch  */ \
105  rtems_stack_checker_begin_extension,         /* task_begin   */ \
106  0,                                           /* task_exitted */ \
107  0 /* rtems_stack_checker_fatal_extension */, /* fatal        */ \
108}
109
110#ifdef __cplusplus
111}
112#endif
113
114#endif
115/* end of include file */
Note: See TracBrowser for help on using the repository browser.