summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:18:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:18:13 +0000
commitee13a74e4c6e8478a721753a266e99b998c497bc (patch)
tree74c9caf0380aca7c2eb0e9995eed7b36fd07f4ba
parent2002-07-01 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-ee13a74e4c6e8478a721753a266e99b998c497bc.tar.bz2
2002-07-01 Joel Sherrill <joel@OARcorp.com>
* stackchk/check.c: Corrected use of _Objects_Information_table now that it is a two dimensional array based upon API and class.
-rw-r--r--c/src/libmisc/ChangeLog6
-rw-r--r--c/src/libmisc/stackchk/check.c28
-rw-r--r--cpukit/libmisc/ChangeLog6
-rw-r--r--cpukit/libmisc/stackchk/check.c28
4 files changed, 44 insertions, 24 deletions
diff --git a/c/src/libmisc/ChangeLog b/c/src/libmisc/ChangeLog
index fbcc1f9506..347754fb94 100644
--- a/c/src/libmisc/ChangeLog
+++ b/c/src/libmisc/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-01 Joel Sherrill <joel@OARcorp.com>
+
+ * stackchk/check.c: Corrected use of
+ _Objects_Information_table now that it is a two dimensional
+ array based upon API and class.
+
2002-06-25 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
* With the addition of serdbg, the standard polled I/O functions
diff --git a/c/src/libmisc/stackchk/check.c b/c/src/libmisc/stackchk/check.c
index 8e811e493d..297f161752 100644
--- a/c/src/libmisc/stackchk/check.c
+++ b/c/src/libmisc/stackchk/check.c
@@ -150,7 +150,7 @@ void Stack_check_Initialize( void )
unsigned32 *p;
#if 0
unsigned32 i;
- unsigned32 class_index;
+ unsigned32 api_index;
Thread_Control *the_thread;
Objects_Information *information;
#endif
@@ -204,11 +204,13 @@ void Stack_check_Initialize( void )
#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 ( api_index = 1;
+ api_index <= OBJECTS_APIS_LAST ;
+ api_index++ ) {
+ if ( !_Objects_Information_table[ api_index ] )
+ continue;
+ information = _Objects_Information_table[ api_index ][ 1 ];
+ if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
Stack_check_Create_extension( the_thread, the_thread );
@@ -495,7 +497,7 @@ void Stack_check_Fatal_extension(
void Stack_check_Dump_usage( void )
{
unsigned32 i;
- unsigned32 class_index;
+ unsigned32 api_index;
Thread_Control *the_thread;
unsigned32 hit_running = 0;
Objects_Information *information;
@@ -508,11 +510,13 @@ void Stack_check_Dump_usage( void )
" ID NAME LOW HIGH AVAILABLE USED\n"
);
- 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 ( api_index = 1 ;
+ api_index <= OBJECTS_APIS_LAST ;
+ api_index++ ) {
+ if ( !_Objects_Information_table[ api_index ] )
+ continue;
+ information = _Objects_Information_table[ api_index ][ 1 ];
+ if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
Stack_check_Dump_threads_usage( the_thread );
diff --git a/cpukit/libmisc/ChangeLog b/cpukit/libmisc/ChangeLog
index fbcc1f9506..347754fb94 100644
--- a/cpukit/libmisc/ChangeLog
+++ b/cpukit/libmisc/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-01 Joel Sherrill <joel@OARcorp.com>
+
+ * stackchk/check.c: Corrected use of
+ _Objects_Information_table now that it is a two dimensional
+ array based upon API and class.
+
2002-06-25 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
* With the addition of serdbg, the standard polled I/O functions
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index 8e811e493d..297f161752 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -150,7 +150,7 @@ void Stack_check_Initialize( void )
unsigned32 *p;
#if 0
unsigned32 i;
- unsigned32 class_index;
+ unsigned32 api_index;
Thread_Control *the_thread;
Objects_Information *information;
#endif
@@ -204,11 +204,13 @@ void Stack_check_Initialize( void )
#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 ( api_index = 1;
+ api_index <= OBJECTS_APIS_LAST ;
+ api_index++ ) {
+ if ( !_Objects_Information_table[ api_index ] )
+ continue;
+ information = _Objects_Information_table[ api_index ][ 1 ];
+ if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
Stack_check_Create_extension( the_thread, the_thread );
@@ -495,7 +497,7 @@ void Stack_check_Fatal_extension(
void Stack_check_Dump_usage( void )
{
unsigned32 i;
- unsigned32 class_index;
+ unsigned32 api_index;
Thread_Control *the_thread;
unsigned32 hit_running = 0;
Objects_Information *information;
@@ -508,11 +510,13 @@ void Stack_check_Dump_usage( void )
" ID NAME LOW HIGH AVAILABLE USED\n"
);
- 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 ( api_index = 1 ;
+ api_index <= OBJECTS_APIS_LAST ;
+ api_index++ ) {
+ if ( !_Objects_Information_table[ api_index ] )
+ continue;
+ information = _Objects_Information_table[ api_index ][ 1 ];
+ if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
Stack_check_Dump_threads_usage( the_thread );