Fill in temporary implementation of sigar_cpu_list_get to get all the

tests passing on darwin.  Will add support for multiple cpu's later.
This commit is contained in:
Ryan Morgan 2004-09-23 06:10:26 +00:00
parent 03b36fdd4c
commit a467383f27
1 changed files with 8 additions and 2 deletions

View File

@ -222,7 +222,6 @@ int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)
cpu->total = cpu->user + cpu->nice + cpu->sys + cpu->idle;
#else
/*XXX*/
cpu->user = 0;
@ -238,7 +237,14 @@ int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)
int sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist)
{
return SIGAR_ENOTIMPL;
sigar_cpu_t *cpu;
sigar_cpu_list_create(cpulist);
/* XXX multi cpu */
cpu = &cpulist->data[cpulist->number++];
return sigar_cpu_get(sigar, cpu);
}
int sigar_uptime_get(sigar_t *sigar,