summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libmisc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-01-19 22:21:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-01-19 22:21:16 +0000
commit2931001675127e9e02f3aff17dc590dc8d59fa19 (patch)
tree164c0cef6070281ec63920ec663f9ae7efb5857f /c/src/lib/libmisc
parentadded a task begin extension for unix simulator configurations. This extension (diff)
downloadrtems-2931001675127e9e02f3aff17dc590dc8d59fa19.tar.bz2
Added condition compile flag for dump of stack usage information on
system exit.
Diffstat (limited to 'c/src/lib/libmisc')
-rw-r--r--c/src/lib/libmisc/stackchk/check.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/c/src/lib/libmisc/stackchk/check.c b/c/src/lib/libmisc/stackchk/check.c
index 29939d6d4c..35b568e090 100644
--- a/c/src/lib/libmisc/stackchk/check.c
+++ b/c/src/lib/libmisc/stackchk/check.c
@@ -104,6 +104,12 @@ Stack_check_Control Stack_check_Pattern;
Stack_Control stack_check_interrupt_stack;
/*
+ * Prototypes necessary for forward references
+ */
+
+void Stack_check_Dump_usage( void );
+
+/*
* Fill an entire stack area with BYTE_PATTERN.
* This will be used by a Fatal extension to check for
* amount of actual stack used
@@ -162,6 +168,10 @@ void Stack_check_Initialize( void )
Stack_check_Blown_task = 0;
+#ifdef STACK_CHECKER_REPORT_USAGE
+ atexit( Stack_check_Dump_usage );
+#endif
+
/*
* If installed by a task, that task will not get setup properly
* since it missed out on the create hook. This will cause a