From 2931001675127e9e02f3aff17dc590dc8d59fa19 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 19 Jan 1996 22:21:16 +0000 Subject: Added condition compile flag for dump of stack usage information on system exit. --- c/src/libmisc/stackchk/check.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'c/src/libmisc/stackchk') diff --git a/c/src/libmisc/stackchk/check.c b/c/src/libmisc/stackchk/check.c index 29939d6d4c..35b568e090 100644 --- a/c/src/libmisc/stackchk/check.c +++ b/c/src/libmisc/stackchk/check.c @@ -103,6 +103,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 @@ -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 -- cgit v1.2.3