Changeset 236b701 in rtems


Ignore:
Timestamp:
Aug 14, 2003, 8:25:28 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d216fca7
Parents:
75fcb394
Message:

2003-08-14 Joel Sherrill <joel@…>

PR 408/filesystem

  • cpuuse/cpuuse.c: Added sync() service. As part of adding this service, the new RTEMS service rtems_iterate_over_all_threads() was also added. This new service makes it easier to iterate over all the tasks/threads in a system and perform an action on them. This change is to use the new thread iteration service.
Location:
cpukit/libmisc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/ChangeLog

    r75fcb394 r236b701  
     12003-08-14      Joel Sherrill <joel@OARcorp.com>
     2
     3        PR 408/filesystem
     4        * cpuuse/cpuuse.c: Added sync() service. As part of adding this
     5        service, the new RTEMS service rtems_iterate_over_all_threads() was
     6        also added. This new service makes it easier to iterate over all the
     7        tasks/threads in a system and perform an action on them. This change
     8        is to use the new thread iteration service.
     9
    1102003-08-14      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    211
  • cpukit/libmisc/cpuuse/cpuuse.c

    r75fcb394 r236b701  
    128128 */
    129129
     130static void CPU_usage_Per_thread_handler(
     131  Thread_Control *the_thread
     132)
     133{
     134  the_thread->ticks_executed = 0;
     135}
     136
    130137void CPU_usage_Reset( void )
    131138{
    132   unsigned32           i;
    133   unsigned32           api_index;
    134   Thread_Control      *the_thread;
    135   Objects_Information *information;
    136  
    137139  CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
    138140
    139   for ( api_index = 1 ;
    140         api_index <= OBJECTS_APIS_LAST ;
    141         api_index++ ) {
    142     if ( !_Objects_Information_table[ api_index ] )
    143       continue;
    144     information = _Objects_Information_table[ api_index ][ 1 ];
    145     if ( information ) {
    146       for ( i=1 ; i <= information->maximum ; i++ ) {
    147         the_thread = (Thread_Control *)information->local_table[ i ];
    148  
    149         if ( !the_thread )
    150           continue;
    151  
    152         the_thread->ticks_executed = 0;
    153       }
    154     }
    155   }
    156  
     141  rtems_iterate_over_all_threads(CPU_usage_Per_thread_handler);
    157142}
    158143
Note: See TracChangeset for help on using the changeset viewer.