diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-22 07:46:53 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-22 08:34:45 +0200 |
commit | 3380ee8194ec35506b88257f369e88d1d26350f1 (patch) | |
tree | f2b84dc6ddc0d66e044b012bde6cb036828d5bf6 /cpukit/score/src/cpuset.c | |
parent | score: Fix warning (diff) | |
download | rtems-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/score/src/cpuset.c')
-rw-r--r-- | cpukit/score/src/cpuset.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/score/src/cpuset.c b/cpukit/score/src/cpuset.c index 7addb0dba3..95fbd45ec4 100644 --- a/cpukit/score/src/cpuset.c +++ b/cpukit/score/src/cpuset.c @@ -32,22 +32,22 @@ static CPU_set_Control cpuset_default; */ void _CPU_set_Handler_initialization() { - int i; - int max_cpus; + uint32_t cpu_count; + uint32_t cpu_index; /* We do not support a cpu count over CPU_SETSIZE */ - max_cpus = _SMP_Get_processor_count(); + cpu_count = _SMP_Get_processor_count(); /* This should never happen */ - _Assert( max_cpus <= CPU_SETSIZE ); + _Assert( cpu_count <= CPU_SETSIZE ); /* Initialize the affinity to be the set of all available CPU's */ cpuset_default.set = &cpuset_default.preallocated; cpuset_default.setsize = sizeof( *cpuset_default.set ); CPU_ZERO_S( cpuset_default.setsize, &cpuset_default.preallocated ); - for (i=0; i<max_cpus; i++) - CPU_SET_S(i, cpuset_default.setsize, cpuset_default.set ); + for (cpu_index=0; cpu_index<cpu_count; cpu_index++) + CPU_SET_S((int) cpu_index, cpuset_default.setsize, cpuset_default.set ); } /** |