summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereset.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-22 07:46:53 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-22 08:34:45 +0200
commit3380ee8194ec35506b88257f369e88d1d26350f1 (patch)
treef2b84dc6ddc0d66e044b012bde6cb036828d5bf6 /cpukit/libmisc/cpuuse/cpuusagereset.c
parentscore: Fix warning (diff)
downloadrtems-3380ee8194ec35506b88257f369e88d1d26350f1.tar.bz2
score: Use common names for per-CPU variables
Use "cpu" for an arbitrary Per_CPU_Control variable. Use "cpu_self" for the Per_CPU_Control of the current processor. Use "cpu_index" for an arbitrary processor index. Use "cpu_index_self" for the processor index of the current processor. Use "cpu_count" for the processor count obtained via _SMP_Get_processor_count(). Use "cpu_max" for the processor maximum obtained by rtems_configuration_get_maximum_processors().
Diffstat (limited to 'cpukit/libmisc/cpuuse/cpuusagereset.c')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereset.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c
index e77ac2c006..a167e859f6 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereset.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereset.c
@@ -40,16 +40,16 @@ static void CPU_usage_Per_thread_handler(
void rtems_cpu_usage_reset( void )
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- uint32_t processor_count;
- uint32_t processor;
+ uint32_t cpu_count;
+ uint32_t cpu_index;
_TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
- processor_count = rtems_get_processor_count();
- for ( processor = 0 ; processor < processor_count ; ++processor ) {
- Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( processor );
+ cpu_count = rtems_get_processor_count();
+ for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
+ Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
- per_cpu->time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
+ cpu->time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
}
#else
CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;