From a74c869600d99bff9b22684645e2f59b30079a4b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 23 Jul 2009 15:46:48 +0000 Subject: 2009-07-23 Joel Sherrill * score/src/iterateoverthreads.c: Restructure a bit to make analysis easier. --- cpukit/ChangeLog | 5 +++++ cpukit/score/src/iterateoverthreads.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index a74e5f2358..07456adb05 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2009-07-23 Joel Sherrill + + * score/src/iterateoverthreads.c: Restructure a bit to make analysis + easier. + 2009-07-23 Joel Sherrill * libmisc/Makefile.am, libmisc/shell/main_chmod.c, diff --git a/cpukit/score/src/iterateoverthreads.c b/cpukit/score/src/iterateoverthreads.c index 398a1a1f59..2e9b28eaba 100644 --- a/cpukit/score/src/iterateoverthreads.c +++ b/cpukit/score/src/iterateoverthreads.c @@ -32,21 +32,21 @@ void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) if ( !routine ) return; - for ( api_index = 1 ; - api_index <= OBJECTS_APIS_LAST ; - api_index++ ) { + 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 ]; + if ( !information ) + continue; + + for ( i=1 ; i <= information->maximum ; i++ ) { + the_thread = (Thread_Control *)information->local_table[ i ]; - if ( !the_thread ) - continue; + if ( !the_thread ) + continue; - (*routine)(the_thread); - } + (*routine)(the_thread); } } -- cgit v1.2.3