Changeset 8b2aba5 in mainline for uspace/app/top/ps.c


Ignore:
Timestamp:
2010-04-02T20:22:14Z (15 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ee35ba0b
Parents:
8f56d93
Message:

top echoes also basic cpu info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/ps.c

    r8f56d93 r8b2aba5  
    4141#include <malloc.h>
    4242#include <ps.h>
     43#include <sysinfo.h>
    4344#include "ps.h"
    4445
     
    9495}
    9596
     97unsigned int get_cpu_infos(uspace_cpu_info_t **out_infos)
     98{
     99        unsigned int cpu_count = sysinfo_value("cpu.count");
     100        uspace_cpu_info_t *cpus = malloc(cpu_count * sizeof(uspace_cpu_info_t));
     101        get_cpu_info(cpus);
     102
     103        *out_infos = cpus;
     104        return cpu_count;
     105}
     106
    96107/** @}
    97108 */
Note: See TracChangeset for help on using the changeset viewer.