diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-11 19:35:39 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-11 19:35:39 +0000 |
commit | 3a4ae6c210bcc37754767966f1128ae23c77b6af (patch) | |
tree | 8804983e5b92bec788d548df13db7513118d351d /c/src/lib/libmisc/stackchk | |
parent | new file -- split from inlines (diff) | |
download | rtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2 |
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.
Configuration parameter maximum_devices added.
Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.
Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.
Added user extension for post-switch.
Utilized user extensions to implement API specific functionality
like signal dispatching.
Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.
Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.
All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.
Updated spsize to reflect new and moved variables.
Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.
Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.
Diffstat (limited to 'c/src/lib/libmisc/stackchk')
-rw-r--r-- | c/src/lib/libmisc/stackchk/check.c | 51 | ||||
-rw-r--r-- | c/src/lib/libmisc/stackchk/internal.h | 2 |
2 files changed, 36 insertions, 17 deletions
diff --git a/c/src/lib/libmisc/stackchk/check.c b/c/src/lib/libmisc/stackchk/check.c index f9f32c5204..c2ee9a0a10 100644 --- a/c/src/lib/libmisc/stackchk/check.c +++ b/c/src/lib/libmisc/stackchk/check.c @@ -18,18 +18,9 @@ * */ -#include <rtems/system.h> -#include <rtems/extension.h> -#include <rtems/fatal.h> -#include <rtems/heap.h> -#include <rtems/stack.h> -#include <rtems/thread.h> -#ifdef XXX_RTEMS_H_FIXED -#include <bsp.h> -#else -#include <rtems/config.h> +#include <rtems.h> + extern rtems_configuration_table BSP_Configuration; -#endif #include <assert.h> #include <stdio.h> @@ -56,6 +47,7 @@ rtems_extensions_table Stack_check_Extension_table = { 0, /* rtems_task_restart */ 0, /* rtems_task_delete */ Stack_check_Switch_extension, /* task_switch */ + 0, /* task_post_switch */ Stack_check_Begin_extension, /* task_begin */ 0, /* task_exitted */ Stack_check_Fatal_extension, /* fatal */ @@ -133,9 +125,13 @@ unsigned32 stack_check_initialized = 0; void Stack_check_Initialize( void ) { - rtems_status_code status; - Objects_Id id_ignored; - unsigned32 *p; + rtems_status_code status; + Objects_Id id_ignored; + unsigned32 *p; + unsigned32 i; + unsigned32 class_index; + Thread_Control *the_thread; + Objects_Information *information; if (stack_check_initialized) return; @@ -171,10 +167,31 @@ void Stack_check_Initialize( void ) * So pretend here that we actually ran create and begin extensions. */ + /* XXX + * + * Technically this has not been done for any task created before this + * happened. So just run through them and fix the situation. + */ +#if 0 if (_Thread_Executing) { Stack_check_Create_extension(_Thread_Executing, _Thread_Executing); } +#endif + +#if 0 + for ( class_index = OBJECTS_CLASSES_FIRST ; + class_index <= OBJECTS_CLASSES_LAST ; + class_index++ ) { + information = _Objects_Information_table[ class_index ]; + if ( information && information->is_thread ) { + for ( i=1 ; i <= information->maximum ; i++ ) { + the_thread = (Thread_Control *)information->local_table[ i ]; + Stack_check_Create_extension( the_thread, the_thread ); + } + } + } +#endif /* * If appropriate, setup the interrupt stack for high water testing @@ -197,13 +214,15 @@ void Stack_check_Initialize( void ) * Stack_check_Create_extension */ -void Stack_check_Create_extension( +boolean Stack_check_Create_extension( Thread_Control *running, Thread_Control *the_thread ) { - if (the_thread && (the_thread != _Thread_Executing)) + if (the_thread /* XXX && (the_thread != _Thread_Executing) */ ) stack_check_dope_stack(&the_thread->Start.Initial_stack); + + return TRUE; } /*PAGE diff --git a/c/src/lib/libmisc/stackchk/internal.h b/c/src/lib/libmisc/stackchk/internal.h index 19c9f5e267..7cecbd6e1a 100644 --- a/c/src/lib/libmisc/stackchk/internal.h +++ b/c/src/lib/libmisc/stackchk/internal.h @@ -50,7 +50,7 @@ typedef struct { * Stack_check_Create_extension */ -void Stack_check_Create_extension( +boolean Stack_check_Create_extension( Thread_Control *running, Thread_Control *the_thread ); |