summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-23 21:06:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-23 21:06:31 +0000
commit5250ff39f042c09503b61eb81a2c705e9b06b917 (patch)
treec685bbf9969cc3ec5da6d24b7b353805d6371edb /cpukit/libmisc
parentSupport for variable length names added to Object Handler. This supports (diff)
downloadrtems-5250ff39f042c09503b61eb81a2c705e9b06b917.tar.bz2
Moved _Thread_Information -> _RTEMS_tasks_Information.
Added a table of object information control blocks. Modified _Thread_Get so it looks up a thread regardless of which thread management "entity" (manager, internal, etc) actually "owns" it.
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r--cpukit/libmisc/monitor/mon-object.c2
-rw-r--r--cpukit/libmisc/stackchk/check.c26
2 files changed, 19 insertions, 9 deletions
diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c
index 2747b23551..619ae5cf79 100644
--- a/cpukit/libmisc/monitor/mon-object.c
+++ b/cpukit/libmisc/monitor/mon-object.c
@@ -60,7 +60,7 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
},
{ RTEMS_OBJECT_TASK,
- (void *) &_Thread_Information,
+ (void *) &_RTEMS_tasks_Information,
sizeof(rtems_monitor_task_t),
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index f5e64efd33..1d30bc813e 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -415,9 +415,11 @@ void Stack_check_Fatal_extension( unsigned32 status )
void Stack_check_Dump_usage( void )
{
- unsigned32 i;
- Thread_Control *the_thread;
- unsigned32 hit_running = 0;
+ unsigned32 i;
+ unsigned32 class_index;
+ Thread_Control *the_thread;
+ unsigned32 hit_running = 0;
+ Objects_Information *information;
if (stack_check_initialized == 0)
return;
@@ -425,11 +427,19 @@ void Stack_check_Dump_usage( void )
printf(
" ID NAME LOW HIGH AVAILABLE USED\n"
);
- for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
- the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
- Stack_check_Dump_threads_usage( the_thread );
- if ( the_thread == _Thread_Executing )
- hit_running = 1;
+
+ 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_Dump_threads_usage( the_thread );
+ if ( the_thread == _Thread_Executing )
+ hit_running = 1;
+ }
+ }
}
if ( !hit_running )