Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    r1ab8539 rfeeac0d  
    8080static mutex_t load_lock;
    8181
     82/** Get system uptime
     83 *
     84 * @param item Sysinfo item (unused).
     85 * @param data Unused.
     86 *
     87 * @return System uptime (in secords).
     88 *
     89 */
     90static sysarg_t get_stats_uptime(struct sysinfo_item *item, void *data)
     91{
     92        /* This doesn't have to be very accurate */
     93        return uptime->seconds1;
     94}
     95
    8296/** Get statistics of all CPUs
    8397 *
     
    804818        mutex_initialize(&load_lock, MUTEX_PASSIVE);
    805819       
     820        sysinfo_set_item_gen_val("system.uptime", NULL, get_stats_uptime, NULL);
    806821        sysinfo_set_item_gen_data("system.cpus", NULL, get_stats_cpus, NULL);
    807822        sysinfo_set_item_gen_data("system.physmem", NULL, get_stats_physmem, NULL);
Note: See TracChangeset for help on using the changeset viewer.